:root {
  color-scheme: dark;
  --ink: #f4f0e8;
  --muted: #c1c9c2;
  --accent: #e6b566;
  --accent-hover: #f3ce8a;
  --night: #14232d;
  --night-deep: #091319;
  --card: rgba(24, 53, 57, .76);
  --border: rgba(225, 232, 215, .2);
  --focus: #9fe0cc;
}

* { box-sizing: border-box; }

body {
  min-width: 20rem;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 3%, rgba(230, 181, 102, .17), transparent 27rem),
    radial-gradient(circle at 92% 20%, rgba(94, 166, 151, .18), transparent 25rem),
    linear-gradient(145deg, var(--night) 0%, var(--night-deep) 74%);
  font-family: ui-rounded, "Nunito", "Trebuchet MS", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

button:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.container { width: min(100% - 2rem, 62rem); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

main { position: relative; isolation: isolate; padding-block: clamp(1.25rem, 4vw, 3rem); }
main::before, main::after {
  position: fixed;
  z-index: -1;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  content: "";
  filter: blur(1px);
  opacity: .7;
  pointer-events: none;
}
main::before { top: 35%; left: -11rem; background: rgba(222, 173, 98, .11); }
main::after { right: -10rem; bottom: 4%; background: rgba(79, 144, 137, .15); }

.affirmation-section { padding-inline: 1rem; }
.affirmation-card {
  position: relative;
  overflow: hidden;
  padding: clamp(2.25rem, 7vw, 5rem) clamp(1.5rem, 6vw, 5rem);
  border: 1px solid var(--border);
  border-radius: 2.5rem .75rem 2.5rem .75rem;
  background: linear-gradient(135deg, rgba(35, 70, 74, .92), var(--card));
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, .28);
}
.affirmation-card::after {
  position: absolute;
  top: -5rem;
  right: -3.5rem;
  width: 12rem;
  height: 12rem;
  border: 1px solid rgba(230, 181, 102, .36);
  border-radius: 48% 52% 66% 34% / 45% 42% 58% 55%;
  content: "";
  transform: rotate(-18deg);
}

h1 { margin: 0; }
blockquote {
  position: relative;
  max-width: 25ch;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 7vw, 4.5rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.045em;
  text-wrap: balance;
}
blockquote::before, blockquote::after { color: var(--accent); font-size: 1.15em; line-height: 0; }
blockquote::before { content: "“"; margin-right: .04em; }
blockquote::after { content: "”"; margin-left: .04em; }

.message-section { padding-block: 1rem 0; }
.message-form { display: grid; gap: .8rem; max-width: 44rem; margin-inline: auto; }
textarea {
  display: block;
  width: 100%;
  min-height: 7.5rem;
  padding: 1rem 1.1rem;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 1.15rem;
  color: var(--ink);
  background: rgba(255, 255, 255, .07);
  box-shadow: inset 0 1px rgba(255, 255, 255, .08);
  font: inherit;
}
textarea::placeholder { color: var(--muted); opacity: .85; }
textarea:hover { border-color: rgba(159, 224, 204, .55); }
.button {
  justify-self: end;
  padding: .75rem 1.25rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #182016;
  box-shadow: 0 .6rem 1.2rem rgba(230, 181, 102, .2);
  font: inherit;
  font-weight: 800;
  letter-spacing: .02em;
  cursor: pointer;
}
.button:hover { background: var(--accent-hover); transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .7; transform: none; }
.form-status { min-height: 1.5rem; margin: 0; color: var(--muted); font-size: .9rem; text-align: right; }

.not-found { padding-block: 20vh; }
.not-found > p { max-width: 32rem; margin: 1.25rem 0 2rem; color: var(--muted); }

@media (min-width: 48rem) {
  .container { width: min(100% - 4rem, 62rem); }
  main { display: grid; align-content: center; min-height: 100vh; padding-block: 2rem; }
  .affirmation-section { padding-inline: 2rem; }
  .message-section { padding-top: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .button:hover { transform: none; }
}