:root {
  --paper: #fff3df;
  --paper-strong: #fffaf0;
  --ink: #262520;
  --muted: #746f61;
  --line: rgba(61, 55, 43, 0.15);
  --green: #6f9568;
  --green-dark: #3d6643;
  --rose: #f28c8c;
  --rose-soft: #ffd1ca;
  --yellow: #f8c96a;
  --sky: #9cc8d7;
  --focus: #2f6f8c;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: "Outfit", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(248, 201, 106, 0.34), transparent 22rem),
    radial-gradient(circle at 82% 20%, rgba(156, 200, 215, 0.34), transparent 24rem),
    linear-gradient(180deg, var(--paper-strong), var(--paper));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(86, 73, 52, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(86, 73, 52, 0.08) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

button,
input {
  font: inherit;
}

.mail-page {
  min-height: 100svh;
  display: grid;
}

.mail-hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 0.82fr);
  align-items: center;
  gap: clamp(2rem, 7vw, 6rem);
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5rem) 0;
}

.copy {
  position: relative;
  z-index: 2;
  animation: riseIn 680ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.eyebrow {
  margin: 0 0 0.9rem;
  color: var(--green-dark);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 760px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(3.3rem, 8vw, 7.4rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 0.88;
  text-wrap: balance;
}

.lede {
  max-width: 36rem;
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 500;
  line-height: 1.55;
}

.opt-form {
  width: min(100%, 620px);
  margin-top: clamp(2rem, 5vw, 3.6rem);
}

.opt-form label {
  display: block;
  margin: 0 0 0.65rem;
  color: #4c493f;
  font-size: 0.92rem;
  font-weight: 800;
}

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem;
  min-height: 62px;
}

input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 1.2rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 48px rgba(116, 93, 56, 0.11);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input:focus {
  border-color: rgba(47, 111, 140, 0.62);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 5px rgba(47, 111, 140, 0.14), 0 18px 48px rgba(116, 93, 56, 0.12);
}

button {
  min-width: 122px;
  border: 0;
  border-radius: 999px;
  padding: 0 1.35rem;
  color: #fffaf0;
  background: var(--ink);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 18px 38px rgba(38, 37, 32, 0.18);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 44px rgba(38, 37, 32, 0.2);
}

button:disabled {
  cursor: wait;
  background: #6f6b5e;
  transform: none;
}

.status {
  min-height: 1.6rem;
  margin: 0.85rem 0 0;
  color: var(--green-dark);
  font-weight: 700;
  line-height: 1.45;
}

.status[data-tone="error"] {
  color: #a2413d;
}

.garden {
  position: relative;
  min-height: min(68vw, 620px);
  animation: gardenIn 860ms 120ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.garden::before {
  content: "";
  position: absolute;
  left: 9%;
  right: 8%;
  bottom: 10%;
  height: 17%;
  border-radius: 50%;
  background: rgba(111, 149, 104, 0.18);
  filter: blur(2px);
}

.stem,
.leaf,
.mail,
.spark {
  position: absolute;
  display: block;
}

.stem {
  bottom: 14%;
  width: 15px;
  border-radius: 999px;
  background: linear-gradient(var(--green), var(--green-dark));
  transform-origin: bottom center;
}

.stem-a {
  left: 24%;
  height: 54%;
  rotate: -8deg;
}

.stem-b {
  left: 50%;
  height: 68%;
}

.stem-c {
  right: 25%;
  height: 49%;
  rotate: 9deg;
}

.leaf {
  width: clamp(76px, 12vw, 126px);
  aspect-ratio: 1.55;
  border-radius: 999px 999px 999px 16px;
  background: var(--green);
  box-shadow: inset -16px -10px 0 rgba(61, 102, 67, 0.18);
}

.leaf-a {
  left: 18%;
  top: 40%;
  rotate: -26deg;
}

.leaf-b {
  right: 14%;
  top: 44%;
  rotate: 32deg;
  transform: scaleX(-1);
}

.mail {
  width: clamp(150px, 21vw, 235px);
  aspect-ratio: 1.34;
  border: 3px solid rgba(38, 37, 32, 0.86);
  border-radius: 8px;
  background: #fffaf0;
  box-shadow: 0 20px 48px rgba(93, 70, 46, 0.16);
}

.mail::before,
.mail::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 22%;
  height: 3px;
  background: rgba(38, 37, 32, 0.72);
  transform-origin: center;
}

.mail::before {
  rotate: 26deg;
}

.mail::after {
  rotate: -26deg;
}

.mail-a {
  left: 14%;
  top: 18%;
  rotate: -7deg;
  animation: bob 5.4s ease-in-out infinite;
}

.mail-b {
  right: 9%;
  top: 12%;
  scale: 0.72;
  rotate: 10deg;
  background: var(--rose-soft);
  animation: bob 5.8s 500ms ease-in-out infinite;
}

.spark {
  width: 18px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 36px -22px 0 var(--rose), -34px 24px 0 var(--sky);
  animation: sparkle 3.6s ease-in-out infinite;
}

.spark-a {
  left: 12%;
  top: 18%;
}

.spark-b {
  right: 16%;
  bottom: 26%;
  scale: 0.8;
  animation-delay: 900ms;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
}

@keyframes gardenIn {
  from {
    opacity: 0;
    transform: translateY(34px) scale(0.96);
  }
}

@keyframes bob {
  50% {
    transform: translateY(-14px) rotate(2deg);
  }
}

@keyframes sparkle {
  50% {
    transform: translateY(-8px) scale(1.12);
    opacity: 0.7;
  }
}

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

@media (max-width: 820px) {
  .mail-hero {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 0.35rem;
    min-height: 100svh;
  }

  .garden {
    order: -1;
    min-height: clamp(190px, 50vw, 270px);
    margin-top: 0;
  }

  .copy {
    margin-top: -0.35rem;
  }

  h1 {
    max-width: 9ch;
    font-size: clamp(3rem, 15vw, 5.1rem);
    line-height: 0.9;
  }

  .lede {
    max-width: 30rem;
    margin-top: 1rem;
  }

  .opt-form {
    margin-top: 1.55rem;
  }

  .mail {
    border-width: 2px;
  }
}

@media (max-width: 560px) {
  body {
    background:
      radial-gradient(circle at 20% 10%, rgba(248, 201, 106, 0.3), transparent 18rem),
      radial-gradient(circle at 86% 18%, rgba(156, 200, 215, 0.28), transparent 19rem),
      linear-gradient(180deg, var(--paper-strong), var(--paper));
  }

  .mail-hero {
    width: min(100% - 24px, 1120px);
    padding: 1rem 0 1.6rem;
  }

  .garden {
    min-height: clamp(170px, 48vw, 220px);
  }

  .garden::before {
    left: 5%;
    right: 5%;
    bottom: 7%;
  }

  .stem {
    width: 11px;
    bottom: 11%;
  }

  .leaf {
    width: clamp(58px, 20vw, 92px);
  }

  .mail-a {
    left: 13%;
    top: 15%;
  }

  .mail-b {
    right: 3%;
    top: 9%;
    scale: 0.62;
  }

  .spark {
    width: 13px;
    box-shadow: 28px -16px 0 var(--rose), -24px 18px 0 var(--sky);
  }

  .eyebrow {
    margin-bottom: 0.65rem;
    font-size: 0.78rem;
  }

  h1 {
    max-width: 8.5ch;
    font-size: clamp(2.7rem, 14.8vw, 4.1rem);
  }

  .lede {
    margin-top: 0.85rem;
    font-size: 1.02rem;
    line-height: 1.48;
  }

  .field-row {
    grid-template-columns: 1fr;
    gap: 0.62rem;
    min-height: 124px;
  }

  input,
  button {
    min-height: 58px;
  }

  input {
    padding: 0 1rem;
  }

  button {
    width: 100%;
  }

  .status {
    min-height: 2.8rem;
    margin-top: 0.65rem;
    font-size: 0.98rem;
  }
}

@media (max-width: 380px) {
  .mail-hero {
    width: min(100% - 20px, 1120px);
    padding-top: 0.75rem;
  }

  .garden {
    min-height: 150px;
  }

  .mail-b,
  .spark-b {
    display: none;
  }

  h1 {
    font-size: clamp(2.45rem, 14.5vw, 3.35rem);
  }

  .lede {
    font-size: 0.98rem;
  }

  .opt-form {
    margin-top: 1.2rem;
  }
}
