:root {
  color-scheme: light;
  --brown: #8b5a2b;
  --ink: #332820;
  --cream: #f8f1e9;
  --peach: #ffdebc;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body,
button,
input {
  font-family: Georgia, "Times New Roman", serif;
}

body {
  background:
    radial-gradient(circle at 50% 42%, rgb(255 255 255 / 0.92), transparent 44%),
    linear-gradient(145deg, #fbf7f2, var(--cream));
  color: var(--ink);
}

.access-page {
  position: relative;
  display: grid;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  padding: 3rem 1.5rem;
}

.access-page::before {
  position: absolute;
  inset: 1.25rem;
  border: 1px solid rgb(139 90 43 / 0.18);
  content: "";
  pointer-events: none;
}

.access-panel {
  position: relative;
  z-index: 2;
  width: min(100%, 31rem);
  text-align: center;
  animation: panel-enter 700ms cubic-bezier(0.19, 1, 0.22, 1) both;
}

.access-kicker {
  margin: 0 0 1rem;
  color: var(--brown);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--brown);
  font-size: clamp(2.7rem, 9vw, 4.7rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

h1 span {
  display: inline-block;
  margin: 0 0.08em;
  color: #b78355;
  font-size: 0.72em;
  font-style: italic;
}

.access-divider {
  width: 3.75rem;
  height: 1px;
  margin: 1.75rem auto;
  background: var(--peach);
}

.access-copy {
  max-width: 27rem;
  margin: 0 auto 2rem;
  color: #66594e;
  font-size: 1.05rem;
  line-height: 1.7;
}

.access-form {
  width: min(100%, 25rem);
  margin: 0 auto;
  text-align: left;
}

.access-form label {
  display: block;
  margin-bottom: 0.55rem;
  color: #5b4a3d;
  font-size: 0.84rem;
  font-weight: 700;
}

.access-input-wrap {
  position: relative;
}

.access-input-wrap input {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.8rem 3.15rem 0.8rem 1rem;
  border: 1px solid rgb(139 90 43 / 0.28);
  border-radius: 0.35rem;
  background: rgb(255 255 255 / 0.8);
  color: var(--ink);
  font-size: 1rem;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.access-input-wrap input:focus {
  border-color: var(--brown);
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 3px rgb(139 90 43 / 0.12);
}

.toggle-key {
  position: absolute;
  top: 50%;
  right: 0.7rem;
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #806d5d;
  cursor: pointer;
  transform: translateY(-50%);
}

.toggle-key svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.eye-closed {
  display: none;
}

.toggle-key[aria-pressed="true"] .eye-open {
  display: none;
}

.toggle-key[aria-pressed="true"] .eye-closed {
  display: block;
}

.access-error {
  min-height: 1.4rem;
  margin: 0.5rem 0 0;
  color: #a43b2f;
  font-size: 0.85rem;
  line-height: 1.4;
}

.access-submit {
  width: 100%;
  min-height: 3.25rem;
  margin-top: 0.45rem;
  border: 0;
  border-radius: 0.35rem;
  background: var(--brown);
  color: #fff;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 26px rgb(85 49 22 / 0.16);
  transition: filter 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.access-submit:hover {
  filter: brightness(0.95);
  box-shadow: 0 15px 30px rgb(85 49 22 / 0.2);
  transform: translateY(-1px);
}

.access-submit:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.access-note {
  margin: 1.25rem 0 0;
  color: #8a7c70;
  font-size: 0.76rem;
}

.botanical {
  position: absolute;
  width: 17rem;
  height: 24rem;
  color: rgb(139 90 43 / 0.13);
  pointer-events: none;
}

.botanical::before {
  position: absolute;
  top: 1rem;
  left: 50%;
  width: 1px;
  height: 21rem;
  background: currentColor;
  content: "";
  transform: rotate(25deg);
  transform-origin: bottom;
}

.botanical span {
  position: absolute;
  width: 4.8rem;
  height: 2.2rem;
  border: 1px solid currentColor;
  border-radius: 100% 0 100% 0;
}

.botanical span:nth-child(1) {
  top: 3rem;
  left: 7.5rem;
  transform: rotate(25deg);
}

.botanical span:nth-child(2) {
  top: 7rem;
  left: 3.7rem;
  transform: rotate(205deg);
}

.botanical span:nth-child(3) {
  top: 11.5rem;
  left: 8rem;
  transform: rotate(35deg);
}

.botanical span:nth-child(4) {
  top: 16rem;
  left: 4.2rem;
  transform: rotate(215deg);
}

.botanical-left {
  bottom: -5rem;
  left: -3rem;
  transform: rotate(-18deg);
}

.botanical-right {
  top: -5rem;
  right: -3rem;
  transform: rotate(164deg);
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--brown);
  outline-offset: 3px;
}

@keyframes panel-enter {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 600px) {
  .access-page {
    padding: 3rem 2rem;
  }

  .access-page::before {
    inset: 0.75rem;
  }

  .botanical {
    opacity: 0.68;
    transform: scale(0.72) rotate(-18deg);
  }

  .botanical-right {
    transform: scale(0.72) rotate(164deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
