:root {
  --bg: #f7f3ee;
  --text: #4f4a44;
  --pagePadX: 120px;
  --pagePadTop: 86px;
  --pageRadius: 50px;
  --footerPadX: clamp(18px, 6vw, 220px);
  --footerPadY: 80px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: #2f6f6a;
  color: var(--text);
  font-family: Fraunces, ui-serif, Georgia, Cambria, "Times New Roman", Times,
    serif;
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 72;
  text-rendering: optimizeLegibility;
}

.cornerMark {
  position: fixed;
  top: 40px;
  left: 40px;
  z-index: 2;
  width: 27px;
  height: 33px;
  pointer-events: auto;
  cursor: pointer;
}

.cornerMark img {
  display: block;
  width: 100%;
  height: auto;
}

html {
  scroll-behavior: smooth;
}

.underPage {
  display: flex;
  align-items: center;
  padding: var(--footerPadY) var(--footerPadX);
  background: #2f6f6a;
  position: sticky;
  bottom: 0;
  z-index: -1;
}

.underPageInner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.underLeft {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footerLogo {
  display: block;
  width: 100px;
  height: auto;
}

.footerCopyright {
  margin: 0;
  color: #f7f3ee;
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 12px;
  line-height: 18px;
  letter-spacing: 0.02em;
  font-weight: 400;
}

.signupForm {
  flex: 1 1 auto;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  margin: 0;
}

.signupCopy {
  width: 100%;
  margin: 0;
  text-align: right;
  color: #f7f3ee;
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 12px;
  line-height: 18px;
  letter-spacing: 0.02em;
  font-weight: 400;
}

.signupStatus {
  width: 100%;
  margin: 0;
  text-align: right;
  color: rgba(247, 243, 238, 0.9);
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 12px;
  line-height: 18px;
  letter-spacing: 0.02em;
  font-weight: 400;
}

.signupStatus[data-state="error"] {
  color: rgba(255, 255, 255, 0.9);
}

.signupButton:disabled {
  opacity: 0.75;
  cursor: default;
}

.srOnly {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.signupControls {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}

.signupInput {
  flex: 1 1 auto;
  height: 44px;
  padding: 0 14px;
  border-radius: 8px;
  border: none;
  background: #f7f3ee;
  color: var(--text);
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.01em;
  font-weight: 500;
  outline: none;
}

.signupInput::placeholder {
  color: rgba(79, 74, 68, 0.6);
}

.signupInput:focus-visible {
  border-color: rgba(79, 74, 68, 0.5);
  box-shadow: 0 0 0 4px rgba(79, 74, 68, 0.12);
}

.signupButton {
  flex: 0 0 auto;
  height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid #2f6f6a;
  background: #054642;
  color: #f7f3ee;
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.01em;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.signupButton:hover {
  background: #285f5b;
  border-color: #285f5b;
}

.signupButton:active {
  background: #224f4c;
  border-color: #224f4c;
}

.signupButton:focus-visible {
  outline: none;
  border-color: rgba(79, 74, 68, 0.5);
  box-shadow: 0 0 0 4px rgba(79, 74, 68, 0.12);
}

.topPage {
  position: relative;
  z-index: 1;
  background: transparent;
}

.page {
  min-height: 100%;
  display: flex;
  justify-content: center;
  padding: var(--pagePadTop) var(--pagePadX) 120px;
  background: var(--bg);
  border-bottom-left-radius: var(--pageRadius);
  border-bottom-right-radius: var(--pageRadius);
}

.letter {
  width: min(640px, 100%);
  padding: 0;
}

.letterBody {
  font-size: 17px;
  line-height: 1.9;
  font-weight: 100;
}

.letterBody p {
  margin: 0;
}

.letterBody p + p {
  margin-top: 32px;
}

.salutation {
  font-size: 22px;
  line-height: 1.35;
  font-weight: 520;
}

.signoff {
  margin-top: 48px;
  font-size: 22px;
  line-height: 1.35;
  font-weight: 520;
}

@media (max-width: 900px) {
  .underPageInner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    align-items: center;
    justify-content: normal;
    column-gap: 22px;
  }

  .underLeft {
    min-width: 0;
  }

  .signupForm {
    width: 100%;
    max-width: 420px;
    justify-self: end;
  }

  .signupControls {
    flex-wrap: wrap;
    justify-content: flex-end;
    row-gap: 10px;
  }

  .signupInput {
    flex: 1 1 220px;
    min-width: 220px;
  }

  .signupButton {
    white-space: nowrap;
  }
}

@media (max-width: 540px) {
  :root {
    --footerPadX: 18px;
    --pagePadX: 18px;
    --pagePadTop: 92px;
    --pageRadius: 28px;
    --footerPadY: 24px;
  }

  .cornerMark {
    left: 50%;
    transform: translateX(-50%);
  }

  .underPage {
    padding: var(--footerPadY) var(--footerPadX);
  }

  .underPageInner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
  }

  .underLeft {
    width: 100%;
  }

  .signupForm {
    width: 100%;
    max-width: none;
    align-items: stretch;
  }

  .signupCopy {
    text-align: left;
  }

  .signupStatus {
    text-align: left;
  }

  .signupControls {
    flex-direction: column;
    align-items: stretch;
  }

  .signupInput {
    width: 100%;
    flex: 0 0 auto;
    height: 44px;
  }

  .signupButton {
    width: 100%;
  }

  .page {
    padding: var(--pagePadTop) var(--pagePadX) 90px;
  }

  .letterBody {
    font-size: 16.5px;
    line-height: 1.85;
  }

  .salutation,
  .signoff {
    font-size: 20px;
  }
}
