:root {
  --bg: #fcfaf7;
  --surface: #fffdf8;
  --text: #1f1a12;
  --muted: #6a5a44;
  --line: #e8d9c4;
  --accent: #cc5f2b;
  --accent-strong: #a84a1f;
  --ring: #f2b38f;
  --shadow: 0 20px 45px rgba(68, 39, 18, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Kanit", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 5% 5%, #ffe9c8 0, transparent 32%),
    radial-gradient(circle at 95% 10%, #ffd6c7 0, transparent 28%),
    var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

.background-shape {
  position: fixed;
  border-radius: 999px;
  pointer-events: none;
  z-index: 0;
  filter: blur(3px);
}

.background-shape-1 {
  width: 280px;
  height: 280px;
  background: #ffc3a9;
  right: -70px;
  bottom: 15%;
  opacity: 0.4;
}

.background-shape-2 {
  width: 180px;
  height: 180px;
  background: #ffd26f;
  left: -50px;
  top: 35%;
  opacity: 0.35;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1040px;
  margin: 0 auto;
  padding: 38px 18px 56px;
}

.hero {
  margin-bottom: 18px;
  animation: rise 480ms ease-out both;
}

.eyebrow {
  margin: 0;
  color: var(--accent-strong);
  letter-spacing: 0.08em;
  font-size: 0.76rem;
  text-transform: uppercase;
}

h1,
h2 {
  font-family: "Space Grotesk", sans-serif;
  margin: 0;
}

h1 {
  margin-top: 6px;
  font-size: clamp(1.8rem, 5vw, 3rem);
}

.hero p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
}

.card {
  background: color-mix(in srgb, var(--surface) 96%, white);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 24px;
  animation: rise 620ms ease-out both;
}

section + section {
  margin-top: 22px;
}

h2 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.grid {
  display: grid;
  gap: 12px;
}

.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label span {
  font-size: 0.88rem;
  color: #5e513f;
}

input {
  height: 42px;
  border: 1px solid #dec8aa;
  background: #fff;
  border-radius: 10px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--ring);
}

.actions {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  background: var(--accent);
  color: white;
  cursor: pointer;
  transition: background-color 150ms ease, transform 150ms ease;
}

button:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.65;
  cursor: wait;
}

#status {
  margin: 0;
  font-size: 0.92rem;
  color: #684021;
}

.hidden {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 15%, rgba(255, 210, 162, 0.32), transparent 46%),
    rgba(28, 20, 10, 0.55);
  animation: modalFade 220ms ease-out both;
}

.modal-card {
  position: relative;
  width: min(520px, 100%);
  border-radius: 20px;
  border: 1px solid #f0c79f;
  background: linear-gradient(160deg, #fff8ef 0%, #fff2e4 62%, #ffe6cf 100%);
  box-shadow: 0 28px 56px rgba(72, 36, 14, 0.34);
  padding: 24px 22px 20px;
  animation: modalRise 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.modal-kicker {
  margin: 0;
  color: #96481f;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 700;
}

.modal-card h3 {
  margin: 8px 0 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.3rem, 3.6vw, 1.85rem);
  color: #321607;
}

.modal-copy {
  margin: 0;
  color: #5e3a23;
  line-height: 1.45;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #efc39f;
  background: rgba(255, 255, 255, 0.72);
  color: #5d2d14;
  font-size: 1.35rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal-action {
  margin-top: 18px;
  min-width: 120px;
  background: linear-gradient(90deg, #c85727 0%, #da7a3c 100%);
}

@keyframes modalFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalRise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@media (max-width: 820px) {
  .two-col {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 18px;
  }

  .modal-card {
    padding: 22px 18px 18px;
  }
}