:root {
  color-scheme: light;
  --ink: #17342d;
  --muted: #6e6758;
  --paper: #f5eedc;
  --paper-deep: #e9dec3;
  --gold: #a6813c;
  --gold-soft: rgba(166, 129, 60, 0.36);
  --shadow: rgba(40, 32, 19, 0.16);
}

* { box-sizing: border-box; }

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

body {
  min-height: 100svh;
  margin: 0;
  padding: max(18px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  display: grid;
  place-items: center;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  background:
    radial-gradient(circle at 50% 14%, rgba(255,255,255,.58), transparent 38%),
    linear-gradient(135deg, #d9cdb2, #eee5d0 50%, #d7c9a9);
}

button, input { font: inherit; }

.page-shell {
  position: relative;
  width: min(760px, 100%);
  min-height: min(720px, calc(100svh - 36px));
  padding: clamp(66px, 10vw, 104px) clamp(24px, 8vw, 74px);
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(rgba(245,238,220,.93), rgba(245,238,220,.93)),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(82,63,30,.025) 3px 4px);
  border: 1px solid var(--gold);
  box-shadow: 0 20px 65px var(--shadow), inset 0 0 70px rgba(130,99,42,.08);
}

.page-shell::before,
.page-shell::after {
  content: "";
  position: absolute;
  inset: 12px;
  pointer-events: none;
  border: 1px solid var(--gold-soft);
}

.page-shell::after {
  inset: 18px;
  border-color: rgba(166,129,60,.18);
}

.ornament {
  position: absolute;
  top: 31px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold);
  font-size: 26px;
}

.ornament-bottom { top: auto; bottom: 31px; transform: translateX(-50%) rotate(180deg); }

.screen {
  width: 100%;
  max-width: 610px;
  text-align: center;
}

.screen.is-active { animation: reveal .72s cubic-bezier(.2,.65,.25,1) both; }

.eyebrow {
  margin: 0 0 25px;
  color: var(--gold);
  font: 600 .72rem/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: .2em;
  text-transform: uppercase;
}

h1, h2, blockquote {
  margin: 0;
  font-weight: 400;
  text-wrap: balance;
}

h1 { font-size: clamp(1.6rem, 4.5vw, 2.65rem); line-height: 1.27; }
h2 { font-size: clamp(1.85rem, 5vw, 2.8rem); line-height: 1.2; }

.lead {
  max-width: 510px;
  margin: 30px auto 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 2.8vw, 1.3rem);
  line-height: 1.6;
}

blockquote {
  position: relative;
  color: var(--ink);
  font-size: clamp(1.35rem, 4vw, 2.15rem);
  font-style: italic;
  line-height: 1.45;
}

.actions {
  margin-top: 42px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  min-height: 50px;
  padding: 13px 23px;
  border: 1px solid var(--gold);
  border-radius: 2px;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent;
}

.button-primary { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.button-primary:hover { background: #245044; box-shadow: 0 7px 22px rgba(23,52,45,.2); }
.button-secondary { color: var(--ink); background: transparent; }
.button-secondary:hover { background: rgba(166,129,60,.1); }
.button:focus-visible, input:focus-visible { outline: 3px solid rgba(166,129,60,.35); outline-offset: 3px; }
.button:disabled { cursor: wait; opacity: .6; }

form { margin-top: 40px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; text-align: left; }
.field span { display: block; margin-bottom: 9px; color: var(--muted); font-size: .94rem; }

input {
  width: 100%;
  min-height: 52px;
  padding: 11px 12px;
  color: var(--ink);
  background: rgba(255,255,255,.32);
  border: 1px solid var(--gold-soft);
  border-radius: 2px;
  -webkit-appearance: none;
}

.submit { min-width: 160px; margin-top: 10px; }
.status { min-height: 24px; margin: 17px 0 0; color: #8b352b; line-height: 1.45; }
.status.success { color: #2c634f; }

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

@media (max-width: 520px) {
  body { padding: 0; }
  .page-shell { min-height: 100svh; border: 0; box-shadow: none; padding: 74px 29px; }
  .page-shell::before { inset: 10px; }
  .page-shell::after { inset: 15px; }
  .field-grid { grid-template-columns: 1fr; gap: 15px; }
  .actions { flex-direction: column; }
  .button { width: 100%; }
}

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