:root {
  --coke-red: #df111d;
  --coke-dark-red: #a80b12;
  --ink: #0c0c0c;
  --paper: #f7f3ef;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  color: var(--ink);
  font-family: "Montserrat", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: #ffffff;
}

.letter {
  position: relative;
  isolation: isolate;
  width: min(100%, 700px);
  min-height: 100vh;
  padding: clamp(28px, 5vh, 54px) clamp(24px, 8vw, 72px) clamp(36px, 6vh, 64px);
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgb(255 255 255 / 44%) 0 1px, transparent 1.7px),
    radial-gradient(circle at 80% 65%, rgb(0 0 0 / 4%) 0 0.8px, transparent 1.5px),
    linear-gradient(105deg, rgb(255 255 255 / 32%), transparent 38%, rgb(0 0 0 / 2%)),
    var(--paper);
  background-size: 13px 15px, 17px 19px, 100% 100%, auto;
  box-shadow: 0 22px 14px -14px rgb(0 0 0 / 34%);
  transform-origin: center bottom;
  animation: letter-arrive 760ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.letter::before,
.letter::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.letter::before {
  opacity: 0.24;
  background: repeating-linear-gradient(
    7deg,
    transparent 0 4px,
    rgb(82 75 66 / 8%) 5px,
    transparent 6px 10px
  );
  filter: blur(0.5px);
}

.letter::after {
  opacity: 0.17;
  background: repeating-linear-gradient(
    97deg,
    transparent 0 7px,
    rgb(255 255 255 / 80%) 8px,
    transparent 9px 14px
  );
}

.brand-block,
.message {
  position: relative;
  z-index: 1;
}

.welcome {
  margin: 0 0 12px;
  text-align: center;
  font-size: clamp(15px, 2.7vw, 20px);
  font-weight: 500;
}

.brand-logo {
  display: block;
  width: min(100%, 340px);
  height: auto;
  margin: 0 auto;
}

.message {
  max-width: 580px;
  margin: clamp(12px, 2.6vh, 26px) auto 0;
  text-align: center;
}

.welcome,
.brand-logo,
.message > * {
  opacity: 0;
  animation: content-rise 620ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.welcome { animation-delay: 160ms; }
.brand-logo { animation-delay: 240ms; }
.message > :nth-child(1) { animation-delay: 330ms; }
.message > :nth-child(2) { animation-delay: 400ms; }
.message > :nth-child(3) { animation-delay: 470ms; }
.message > :nth-child(4) { animation-delay: 540ms; }
.message > :nth-child(5) { animation-delay: 610ms; }
.message > :nth-child(6) { animation-delay: 680ms; }
.message > :nth-child(7) { animation-delay: 750ms; }
.message > :nth-child(8) { animation-delay: 820ms; }
.message > :nth-child(9) { animation-delay: 890ms; }

.member-form {
  width: min(100%, 480px);
  margin: 0 auto;
}

.identity-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
  text-align: left;
}

.identity-fields label,
.identity-fields label > span {
  display: block;
}

.identity-fields label > span {
  margin: 0 0 6px 3px;
  color: var(--coke-dark-red);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.identity-fields input {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgb(168 11 18 / 28%);
  border-radius: 999px;
  color: var(--ink);
  background: rgb(255 255 255 / 48%);
  box-shadow: inset 0 1px 2px rgb(66 48 41 / 4%);
  font: 600 11px/1 "Montserrat", Arial, sans-serif;
  outline: none;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.identity-fields input::placeholder {
  color: #938b87;
  font-weight: 500;
}

.identity-fields input:focus {
  border-color: var(--coke-red);
  background: rgb(255 255 255 / 76%);
  box-shadow: 0 0 0 2px rgb(223 17 29 / 8%);
}

.member-form .cta {
  width: 100%;
}

.form-message {
  margin: 0 auto 10px;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 600;
}

.form-message.error {
  color: var(--coke-dark-red);
  background: rgb(223 17 29 / 8%);
}

h1 {
  margin: 0 0 clamp(15px, 2.8vh, 24px);
  color: var(--coke-dark-red);
  font-size: clamp(20px, 3.5vw, 27px);
  font-style: italic;
  font-weight: 800;
}

p {
  margin: 0 auto clamp(11px, 2vh, 18px);
  font-size: clamp(12.5px, 2.15vw, 16px);
  font-weight: 500;
  line-height: 1.38;
}

strong {
  font-weight: 800;
}

.care-note {
  margin-top: clamp(15px, 2.6vh, 23px);
  margin-bottom: clamp(20px, 3.4vh, 30px);
  color: var(--coke-dark-red);
  font-size: clamp(13px, 2.4vw, 17px);
  font-style: italic;
  font-weight: 800;
}

.heart {
  display: inline-block;
  margin-left: 3px;
  transform: rotate(-18deg);
  font-size: 18px;
}

.cta {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px clamp(22px, 4vw, 34px);
  border-radius: 999px;
  color: #ffffff;
  background: var(--coke-red);
  box-shadow: 0 8px 18px rgb(177 0 12 / 15%);
  font-size: clamp(14px, 2.6vw, 18px);
  font-style: italic;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.cta:hover {
  background: var(--coke-dark-red);
  box-shadow: 0 10px 24px rgb(177 0 12 / 24%);
  transform: translateY(-2px);
}

.cta:focus-visible {
  outline: 3px solid #111111;
  outline-offset: 4px;
}

@media (min-width: 701px) {
  body {
    padding: 28px;
  }

  .letter {
    min-height: min(900px, calc(100vh - 56px));
    border-radius: 2px;
  }
}

@media (max-width: 430px) {
  .letter {
    padding-inline: 20px;
  }

  .brand-logo {
    width: min(100%, 305px);
  }

  .message {
    margin-top: 12px;
  }

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

@media (max-height: 760px) and (min-width: 500px) {
  .letter {
    padding-top: 24px;
    padding-bottom: 28px;
  }

  .message {
    margin-top: 14px;
  }

  .message p {
    margin-bottom: 9px;
    line-height: 1.28;
  }

  .care-note {
    margin-top: 12px;
    margin-bottom: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .letter,
  .welcome,
  .brand-logo,
  .message > *,
  .cta {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }
}

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

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