:root {
  --bg-top: #d08a44;
  --bg-mid: #9a5a2a;
  --bg-bottom: #5d341e;
  --ink: #2f1c11;
  --ink-soft: #5b3a24;
  --paper: #f8e2be;
  --paper-shadow: #e8c28d;
  --border: #83522d;
  --border-strong: #5f3720;
  --wood: #472719;
  --wood-deep: #2c180f;
  --accent: #b8692f;
  --accent-strong: #8f4d25;
  --accent-soft: #f2c684;
  --danger: #8f2a1f;
  --success: #2c6a46;
  --nav-text: #fbe5c2;
  --nav-hover: rgba(255, 223, 177, 0.18);
  --nav-border: rgba(255, 223, 177, 0.58);
  --field-bg: #fff9ef;
  --field-border: #9f6a37;
  --placeholder: #7a5335;
  --flash-base: #f7dec0;
  --flash-border: #956236;
  --surface-shadow: 0 14px 32px rgba(24, 11, 6, 0.3);
  --surface-shadow-soft: 0 8px 18px rgba(24, 11, 6, 0.22);
  --focus-ring: 0 0 0 3px rgba(240, 179, 92, 0.35);
}

[data-theme="dark"] {
  --bg-top: #2b1d13;
  --bg-mid: #1b130d;
  --bg-bottom: #120c08;
  --ink: #f2dbc0;
  --ink-soft: #d2ac7e;
  --paper: #261b14;
  --paper-shadow: #1c140f;
  --border: #744f33;
  --border-strong: #8a603f;
  --wood: #2c1a11;
  --wood-deep: #170f0a;
  --accent: #d08d49;
  --accent-strong: #d99a5b;
  --accent-soft: #f1c588;
  --nav-text: #f4dbb8;
  --nav-hover: rgba(244, 219, 184, 0.15);
  --nav-border: rgba(244, 219, 184, 0.5);
  --field-bg: #18120d;
  --field-border: #7b5839;
  --placeholder: #b58c62;
  --flash-base: #2d2118;
  --flash-border: #8b6545;
  --surface-shadow: 0 16px 32px rgba(0, 0, 0, 0.45);
  --surface-shadow-soft: 0 8px 20px rgba(0, 0, 0, 0.35);
  --focus-ring: 0 0 0 3px rgba(208, 141, 73, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  font-family: "Rockwell", "Bookman Old Style", "Palatino Linotype", Georgia, serif;
  background:
    radial-gradient(circle at 50% -32%, rgba(255, 212, 144, 0.46), transparent 55%),
    radial-gradient(circle at 88% 6%, rgba(248, 160, 74, 0.24), transparent 26%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 46%, var(--bg-bottom) 100%);
}

.dust-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: radial-gradient(rgba(255, 233, 198, 0.11) 1px, transparent 1px);
  background-size: 6px 6px;
  animation: dust-drift 16s linear infinite;
}

a {
  color: var(--accent-strong);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.site-header {
  position: relative;
  z-index: 12;
  border-bottom: 4px solid var(--wood-deep);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
}

.site-header-image {
  position: relative;
  height: clamp(90px, 14vw, 270px);
  overflow: hidden;
  background-color: var(--wood-deep);
}

.site-header-image-art {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: clamp(180px, 28vw, 540px);
  display: block;
  object-fit: cover;
  object-position: center 32%;
  transform: scaleY(0.5);
  transform-origin: top left;
  animation: header-presence 14s ease-in-out infinite alternate;
}

.site-header-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(18, 9, 5, 0.7) 0%,
    rgba(18, 9, 5, 0.05) 16%,
    rgba(18, 9, 5, 0.05) 84%,
    rgba(18, 9, 5, 0.7) 100%
  );
  z-index: 1;
}

.site-header-image::after {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 12px solid rgba(44, 23, 12, 0.4);
  border-bottom: 10px solid rgba(44, 23, 12, 0.5);
  z-index: 2;
}

.layout {
  position: relative;
  width: min(1120px, 93vw);
  margin: 0.55rem auto 1rem;
  padding-inline: 0.2rem;
}

.layout::before,
.layout::after {
  content: "";
  position: absolute;
  top: 2.4rem;
  width: 20px;
  height: calc(100% - 4.8rem);
  background: linear-gradient(180deg, #6f4328, #4a2a19);
  border-radius: 0 18px 18px 0;
  opacity: 0.56;
  pointer-events: none;
}

.layout::before {
  left: -14px;
}

.layout::after {
  right: -14px;
  transform: scaleX(-1);
}

.flash-stack {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.flash {
  border: 2px solid var(--flash-border);
  border-radius: 8px;
  padding: 0.56rem 0.7rem;
  background: var(--flash-base);
}

.flash-success {
  border-color: #255f41;
  background: #cee9d8;
}

[data-theme="dark"] .flash-success {
  background: rgba(41, 108, 70, 0.32);
}

.eyebrow {
  margin: 0;
  color: var(--accent-strong);
  font-weight: 800;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
}

.index-shell {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(390px, 0.82fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
  min-height: min(620px, calc(100vh - 155px));
  overflow: hidden;
  padding: clamp(1.1rem, 3vw, 2.4rem) clamp(1.1rem, 4vw, 3.2rem) clamp(0.65rem, 1.4vw, 1.05rem);
  border: 3px solid var(--border-strong);
  border-radius: 20px;
  background:
    radial-gradient(circle at 17% 18%, rgba(255, 239, 199, 0.42), transparent 28%),
    radial-gradient(circle at 82% 10%, rgba(87, 48, 24, 0.16), transparent 24%),
    linear-gradient(135deg, rgba(255, 244, 220, 0.9), rgba(235, 195, 132, 0.86) 52%, rgba(177, 99, 46, 0.54));
  box-shadow: var(--surface-shadow);
}

.index-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18), transparent 34%),
    repeating-linear-gradient(
      112deg,
      rgba(89, 50, 26, 0.07) 0,
      rgba(89, 50, 26, 0.07) 1px,
      transparent 1px,
      transparent 18px
    );
}

.index-shell::after {
  content: "";
  position: absolute;
  right: clamp(-80px, -6vw, -36px);
  bottom: clamp(-85px, -7vw, -40px);
  z-index: -1;
  width: clamp(180px, 24vw, 340px);
  aspect-ratio: 1;
  border: 2px solid rgba(70, 38, 20, 0.16);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 229, 177, 0.22), transparent 62%);
  animation: slow-turn 18s linear infinite;
  pointer-events: none;
}

[data-theme="dark"] .index-shell {
  background:
    radial-gradient(circle at 17% 18%, rgba(218, 153, 84, 0.22), transparent 28%),
    radial-gradient(circle at 82% 10%, rgba(255, 220, 160, 0.1), transparent 24%),
    linear-gradient(135deg, rgba(69, 50, 35, 0.97), rgba(30, 21, 15, 0.98) 58%, rgba(91, 63, 39, 0.93));
}

.index-copy {
  max-width: 720px;
  min-width: 0;
  animation: rise-in 620ms ease both;
}

.index-copy h1 {
  max-width: 6.9em;
  margin: 0;
  color: var(--ink);
  font-size: clamp(3rem, 6vw, 5.9rem);
  line-height: 0.94;
  overflow-wrap: break-word;
  text-shadow: 0 2px 0 rgba(255, 239, 206, 0.52), 0 14px 28px rgba(66, 33, 16, 0.2);
  text-transform: uppercase;
}

.index-lede {
  max-width: 56ch;
  margin: clamp(1rem, 2vw, 1.4rem) 0 0;
  color: var(--ink-soft);
  font-size: clamp(1.08rem, 2.1vw, 1.36rem);
  line-height: 1.58;
}

.btn {
  display: inline-block;
  border: 2px solid var(--border-strong);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  color: #fde7c5;
  padding: 0.45rem 0.82rem;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease;
}

.btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.signup-panel {
  position: relative;
  display: grid;
  justify-self: end;
  width: min(100%, 430px);
  gap: 0.82rem;
  padding: clamp(0.9rem, 2.2vw, 1.25rem);
  border: 2px solid rgba(87, 48, 24, 0.46);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 250, 239, 0.9), rgba(246, 224, 188, 0.94)),
    var(--paper);
  box-shadow:
    0 22px 44px rgba(65, 34, 16, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.52);
  animation: form-arrive 700ms 100ms ease both;
}

[data-theme="dark"] .signup-panel {
  background: linear-gradient(135deg, rgba(63, 46, 32, 0.96), rgba(34, 24, 17, 0.96));
}

.signup-panel::before {
  content: "";
  position: absolute;
  inset: 0.48rem;
  border: 1px solid rgba(91, 58, 36, 0.18);
  border-radius: 12px;
  pointer-events: none;
}

.signup-panel-head {
  display: grid;
  gap: 0.25rem;
}

.signup-panel-head h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  line-height: 1.05;
}

.signup-panel-head p:last-child {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.5;
}

.signup-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.62rem 0.78rem;
}

.signup-fields label {
  display: grid;
  gap: 0.32rem;
}

.signup-fields label > span:first-child {
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04rem;
  text-transform: uppercase;
}

.signup-fields input,
.signup-fields select,
.signup-fields textarea {
  width: 100%;
  border: 2px solid rgba(85, 48, 26, 0.56);
  border-radius: 7px;
  padding: 0.44rem 0.5rem;
  background: rgba(255, 251, 244, 0.88);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  font: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

[data-theme="dark"] .signup-fields input,
[data-theme="dark"] .signup-fields select,
[data-theme="dark"] .signup-fields textarea {
  background: rgba(24, 18, 13, 0.88);
}

.signup-fields textarea {
  resize: vertical;
}

.signup-fields input::placeholder,
.signup-fields textarea::placeholder {
  color: var(--placeholder);
}

.signup-fields input:focus,
.signup-fields select:focus,
.signup-fields textarea:focus {
  border-color: var(--accent-strong);
  transform: translateY(-1px);
}

.form-span-full {
  grid-column: 1 / -1;
}

.other-type-field {
  display: none;
}

.other-type-field.is-visible {
  display: grid;
}

.signup-submit {
  justify-self: end;
  min-width: 160px;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.field-error,
.form-error {
  color: var(--danger);
  font-size: 0.88rem;
  font-weight: 700;
}

.form-error {
  margin: 0;
  padding: 0.56rem 0.68rem;
  border: 1px solid rgba(143, 42, 31, 0.46);
  border-radius: 8px;
  background: rgba(255, 238, 232, 0.78);
}

[data-theme="dark"] .form-error {
  background: rgba(96, 34, 28, 0.38);
}

.site-footer {
  padding: 0.58rem 1rem;
  border-top: 3px solid var(--wood-deep);
  background: linear-gradient(180deg, var(--wood), var(--wood-deep));
  color: var(--nav-text);
  text-align: center;
}

.site-footer p {
  margin: 0;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dust-drift {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(6px);
  }
}

@keyframes header-presence {
  from {
    object-position: center 31%;
  }
  to {
    object-position: center 35%;
  }
}

@keyframes form-arrive {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes slow-turn {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  .layout::before,
  .layout::after {
    display: none;
  }

  .site-header-image {
    height: clamp(70px, 15.5vw, 160px);
  }

  .site-header-image-art {
    height: clamp(140px, 31vw, 320px);
    object-position: center top;
  }

  .index-shell {
    grid-template-columns: 1fr;
    gap: 1.6rem;
    min-height: auto;
    padding-bottom: 1rem;
  }

  .signup-panel {
    justify-self: stretch;
    max-width: 680px;
  }
}

@media (max-width: 800px) {
  .layout {
    width: 96vw;
    margin-top: 0.75rem;
  }

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

@media (max-width: 640px) {
  .site-header-image {
    height: clamp(55px, 19vw, 120px);
  }

  .site-header-image-art {
    height: clamp(110px, 38vw, 240px);
  }

  .index-shell {
    padding: 0.9rem 0.85rem 0.75rem;
    border-width: 2px;
    border-radius: 14px;
  }

  .index-copy h1 {
    font-size: clamp(2.6rem, 14vw, 4.2rem);
  }

  .signup-submit {
    width: 100%;
  }
}

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