:root {
  --ink: #14221f;
  --ink-soft: #3e5049;
  --forest: #173b32;
  --forest-deep: #0b2822;
  --paper: #f4eddc;
  --paper-bright: #fffaf0;
  --paper-muted: #d9ceb8;
  --vermilion: #c64b2d;
  --vermilion-dark: #8e2e1b;
  --gold: #d6a84b;
  --line: rgba(20, 34, 31, 0.17);
  --shadow: 0 30px 80px rgba(10, 26, 22, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #bdc9ba;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Trebuchet MS", "Gill Sans", sans-serif;
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 249, 225, 0.9), transparent 28%),
    radial-gradient(circle at 88% 90%, rgba(41, 91, 73, 0.28), transparent 33%),
    linear-gradient(135deg, #cfd8c8 0%, #a9b9a7 100%);
  display: grid;
  place-items: center;
  padding: 34px;
  overflow-x: hidden;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.3;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(22, 47, 39, 0.025) 3px 4px),
    repeating-linear-gradient(90deg, transparent 0 5px, rgba(255, 255, 255, 0.04) 5px 6px);
  mix-blend-mode: multiply;
}

.page-shell {
  position: relative;
  width: min(1120px, 100%);
  min-height: 760px;
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(390px, 0.97fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 4px 28px 4px 28px;
  box-shadow: var(--shadow);
  animation: page-arrival 700ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.world-panel,
.form-panel {
  position: relative;
  min-width: 0;
  isolation: isolate;
}

.world-panel {
  min-height: 760px;
  padding: 58px 58px 48px;
  color: var(--paper-bright);
  background:
    linear-gradient(165deg, rgba(25, 69, 57, 0.2), transparent 42%),
    var(--forest-deep);
  overflow: hidden;
}

.world-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 72% 17%, rgba(214, 168, 75, 0.18), transparent 18%),
    linear-gradient(118deg, transparent 0 67%, rgba(255, 255, 255, 0.035) 67% 67.5%, transparent 67.5%);
}

.world-panel::after {
  content: "";
  position: absolute;
  inset: 20px;
  z-index: -1;
  border: 1px solid rgba(244, 237, 220, 0.11);
  border-right: 0;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 16px;
  animation: reveal-up 600ms 100ms both;
}

.crest {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 248, 224, 0.32);
  color: var(--paper-bright);
  background: var(--vermilion);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.08);
  font-family: "Palatino Linotype", "Book Antiqua", serif;
  font-size: 27px;
  transform: rotate(-3deg);
}

.eyebrow,
.chapter,
.edition {
  margin: 0;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow {
  font-size: 12px;
  font-weight: 800;
}

.edition {
  margin-top: 6px;
  color: rgba(244, 237, 220, 0.6);
  font-size: 10px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 500px;
  margin-top: 90px;
  animation: reveal-up 650ms 220ms both;
}

.chapter {
  margin-bottom: 20px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
}

h1,
h2 {
  margin: 0;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-weight: 700;
  line-height: 1.02;
}

h1 {
  max-width: 470px;
  font-size: clamp(40px, 5vw, 66px);
  letter-spacing: -0.045em;
}

.intro {
  max-width: 440px;
  margin: 25px 0 0;
  color: rgba(244, 237, 220, 0.72);
  font-family: "Palatino Linotype", "Book Antiqua", serif;
  font-size: 17px;
  line-height: 1.7;
}

.server-card {
  position: absolute;
  z-index: 3;
  left: 58px;
  right: 58px;
  bottom: 48px;
  padding: 17px 20px;
  border-left: 3px solid var(--gold);
  background: rgba(4, 22, 18, 0.64);
  backdrop-filter: blur(10px);
  animation: reveal-up 650ms 340ms both;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 250, 240, 0.82);
  font-size: 12px;
  font-weight: 700;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(214, 168, 75, 0.14);
}

.status-dot.online {
  background: #7ccf9a;
  box-shadow: 0 0 0 4px rgba(124, 207, 154, 0.15);
  animation: status-pulse 1.8s infinite;
}

.status-dot.offline {
  background: #df775d;
  box-shadow: 0 0 0 4px rgba(223, 119, 93, 0.15);
}

.server-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin: 15px 0 0;
}

.server-card dl > div {
  border-top: 1px solid rgba(244, 237, 220, 0.12);
  padding-top: 12px;
}

.server-card dt {
  color: rgba(244, 237, 220, 0.45);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.server-card dd {
  margin: 5px 0 0;
  color: var(--paper-bright);
  font-family: "Palatino Linotype", "Book Antiqua", serif;
  font-size: 15px;
}

.landscape {
  position: absolute;
  z-index: 0;
  inset: auto 0 0;
  height: 300px;
  opacity: 0.48;
  overflow: hidden;
}

.sun {
  position: absolute;
  right: 65px;
  top: 12px;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--vermilion);
  box-shadow: 0 0 55px rgba(198, 75, 45, 0.3);
}

.mountain {
  position: absolute;
  bottom: -65px;
  width: 330px;
  height: 260px;
  background: #416b5e;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.mountain-one {
  left: -90px;
  transform: rotate(-3deg);
}

.mountain-two {
  left: 150px;
  bottom: -85px;
  width: 420px;
  height: 310px;
  background: #295347;
}

.mountain-three {
  right: -150px;
  bottom: -75px;
  background: #376357;
}

.mist {
  position: absolute;
  height: 12px;
  border-radius: 100%;
  background: rgba(244, 237, 220, 0.2);
  filter: blur(5px);
}

.mist-one {
  width: 300px;
  left: 35px;
  bottom: 110px;
}

.mist-two {
  width: 240px;
  right: 15px;
  bottom: 165px;
}

.form-panel {
  min-height: 760px;
  display: flex;
  flex-direction: column;
  padding: 66px 70px 38px;
  background:
    linear-gradient(rgba(20, 34, 31, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 34, 31, 0.025) 1px, transparent 1px),
    var(--paper);
  background-size: 24px 24px;
}

.form-panel::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 18px;
  width: 1px;
  background: rgba(198, 75, 45, 0.26);
  box-shadow: 5px 0 0 rgba(198, 75, 45, 0.09);
}

.form-heading {
  animation: reveal-up 600ms 160ms both;
}

.form-heading .eyebrow {
  color: var(--vermilion);
}

h2 {
  margin-top: 12px;
  font-size: clamp(34px, 4vw, 46px);
  letter-spacing: -0.035em;
}

.form-heading > p:last-child {
  max-width: 420px;
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-family: "Palatino Linotype", "Book Antiqua", serif;
  font-size: 15px;
  line-height: 1.6;
}

form {
  margin-top: 36px;
  animation: reveal-up 650ms 280ms both;
}

.field-group + .field-group {
  margin-top: 21px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.input-wrap {
  position: relative;
}

input {
  width: 100%;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 2px 10px 2px 10px;
  outline: 0;
  padding: 0 66px 0 16px;
  color: var(--ink);
  background: rgba(255, 250, 240, 0.7);
  font: 600 16px "Trebuchet MS", "Gill Sans", sans-serif;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input::placeholder {
  color: #756e61;
  font-weight: 400;
}

input:hover {
  background: var(--paper-bright);
}

input:focus {
  border-color: var(--vermilion);
  background: var(--paper-bright);
  box-shadow: 0 0 0 3px rgba(198, 75, 45, 0.11);
}

input.invalid {
  border-color: var(--vermilion);
  box-shadow: 0 0 0 3px rgba(198, 75, 45, 0.09);
}

.field-mark,
.reveal-button {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
}

.field-mark {
  color: var(--paper-muted);
  font-family: "Palatino Linotype", "Book Antiqua", serif;
  font-size: 13px;
}

.reveal-button {
  border: 0;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 4px;
  color: var(--vermilion-dark);
  background: transparent;
  cursor: pointer;
  font: 800 11px "Trebuchet MS", "Gill Sans", sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.reveal-button:focus-visible {
  outline: 2px solid var(--vermilion);
  outline-offset: 3px;
}

.field-help {
  margin: 7px 0 0;
  color: #5f594f;
  font-size: 12px;
}

.form-message {
  margin-top: 22px;
  border-left: 3px solid var(--vermilion);
  padding: 12px 14px;
  color: var(--vermilion-dark);
  background: rgba(198, 75, 45, 0.08);
  font-size: 13px;
  line-height: 1.5;
}

.form-message.success {
  border-color: #3e8168;
  color: #245a48;
  background: rgba(62, 129, 104, 0.1);
}

.submit-button {
  width: 100%;
  height: 56px;
  margin-top: 25px;
  border: 0;
  border-radius: 2px 12px 2px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 0 23px;
  color: var(--paper-bright);
  background: linear-gradient(100deg, var(--vermilion-dark), var(--vermilion));
  box-shadow: 0 12px 28px rgba(142, 46, 27, 0.2);
  cursor: pointer;
  font: 800 14px "Trebuchet MS", "Gill Sans", sans-serif;
  letter-spacing: 0.04em;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.submit-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(142, 46, 27, 0.28);
  filter: saturate(1.08);
}

.submit-button:focus-visible {
  outline: 3px solid rgba(198, 75, 45, 0.28);
  outline-offset: 4px;
}

.submit-button:disabled {
  cursor: wait;
  filter: grayscale(0.25);
  opacity: 0.72;
}

.arrow {
  font-size: 23px;
  line-height: 1;
}

.privacy-note {
  margin: 14px 8px 0;
  color: #625b50;
  font-family: "Palatino Linotype", "Book Antiqua", serif;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

footer {
  position: static;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  margin-top: auto;
  padding-top: 14px;
  color: #817866;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.seal {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  color: var(--vermilion);
  border: 1px solid rgba(198, 75, 45, 0.44);
  font-family: "Palatino Linotype", "Book Antiqua", serif;
  font-size: 13px;
  transform: rotate(4deg);
}

@keyframes page-arrival {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes status-pulse {
  50% {
    box-shadow: 0 0 0 7px rgba(124, 207, 154, 0.04);
  }
}

@media (max-width: 900px) {
  body {
    display: block;
    padding: 18px;
  }

  .page-shell {
    grid-template-columns: 1fr;
    max-width: 650px;
    margin: 0 auto;
    border-radius: 3px 20px 3px 20px;
  }

  .world-panel {
    min-height: 430px;
    padding: 42px 38px 36px;
  }

  .hero-copy {
    margin-top: 48px;
  }

  h1 {
    max-width: 520px;
    font-size: clamp(38px, 9vw, 56px);
  }

  .intro {
    margin-top: 17px;
  }

  .server-card {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    margin-top: 34px;
  }

  .landscape {
    height: 210px;
  }

  .form-panel {
    min-height: 760px;
    padding: 54px 44px 90px;
  }

  footer {
    margin-top: 42px;
  }
}

@media (max-width: 520px) {
  body {
    padding: 0;
    background: var(--paper);
  }

  .page-shell {
    width: 100%;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .world-panel {
    min-height: 365px;
    padding: 30px 25px;
  }

  .world-panel::after {
    inset: 11px;
  }

  .crest {
    width: 46px;
    height: 46px;
    font-size: 23px;
  }

  .hero-copy {
    margin-top: 42px;
  }

  .chapter {
    margin-bottom: 14px;
  }

  h1 {
    font-size: 39px;
  }

  .intro {
    font-size: 15px;
    line-height: 1.55;
  }

  .form-panel {
    min-height: 760px;
    padding: 45px 25px 85px;
  }

  .form-panel::before {
    left: 10px;
  }

  h2 {
    font-size: 36px;
  }

  form {
    margin-top: 30px;
  }

  footer {
    margin-top: 42px;
  }

  .server-card {
    padding-right: 14px;
    padding-left: 14px;
  }

  .server-card dl {
    gap: 12px;
  }

  .server-card dd {
    overflow-wrap: anywhere;
  }
}

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