:root {
  color-scheme: light;
  --ink: #3d3d3d;
  --muted: #6a5658;
  --line: #f4bec3;
  --paper: #ffffff;
  --wash: #fff3eb;
  --soft: #fdeef0;
  --accent: #ec515e;
  --accent-strong: #ad1a27;
  --dark: #3d3d3d;
  --danger: #ad1a27;
  --focus: rgba(236, 138, 108, 0.38);
  --wg-gradient: linear-gradient(90deg, #ec8a6c 0%, #ee8a7e 22%, #ec6f95 100%);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family:
    Onest, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.4;
}

.page {
  width: min(100%, 880px);
  margin: 0 auto;
  padding: 16px 12px;
}

form {
  display: grid;
  gap: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 14px 42px rgba(67, 20, 24, 0.07);
}

.form-heading {
  display: grid;
  gap: 4px;
  margin-bottom: 0;
}

h1 {
  margin: 0;
  color: var(--accent);
  background: var(--wg-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

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

.field {
  display: grid;
  gap: 4px;
  align-content: start;
}

.field-half {
  width: 100%;
}

label {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0;
}

.required-mark {
  margin-left: 2px;
  color: var(--muted);
  font-size: 0.82em;
  font-weight: 650;
  opacity: 0.58;
}

input,
textarea,
select,
button {
  font: inherit;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--ink);
  background: #fff;
}

input {
  min-height: 35px;
}

select {
  min-height: 35px;
}

textarea {
  min-height: 64px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus,
button:focus-visible,
.upload-box:has(+ input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-color: var(--accent);
}

#website,
#attachment {
  position: absolute;
  left: -100vw;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.upload-box {
  display: grid;
  justify-items: center;
  gap: 7px;
  min-height: 124px;
  border: 1px dashed var(--accent);
  border-radius: 8px;
  padding: 18px 16px;
  color: var(--ink);
  background: var(--soft);
  cursor: pointer;
  text-align: center;
}

.upload-box:hover {
  border-color: var(--accent-strong);
  background: #fff7f7;
}

.upload-icon {
  width: 27px;
  height: 22px;
  color: var(--accent-strong);
}

.upload-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.upload-box span:not(.upload-icon) {
  font-weight: 700;
}

.upload-box strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-radius: 8px;
  padding: 0 12px;
  color: #fff;
  background: var(--dark);
  font-size: 0.9rem;
  font-weight: 800;
}

.upload-box strong:hover {
  background: #262626;
}

.upload-box small {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.notice {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--accent-strong);
  background: var(--soft);
  font-size: 0.92rem;
  font-weight: 650;
}

.notice a {
  color: var(--accent-strong);
  font-weight: 800;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  color: #fff;
  background: var(--wg-gradient);
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: var(--dark);
}

button[disabled] {
  cursor: progress;
  opacity: 0.72;
}

.success-banner {
  display: grid;
  justify-items: center;
  gap: 6px;
  border: 1px solid #86efac;
  border-radius: 8px;
  padding: 14px 18px;
  color: #166534;
  background: #ecfdf3;
  box-shadow: 0 18px 60px rgba(22, 101, 52, 0.12);
  text-align: center;
}

.success-banner strong {
  color: #14532d;
  font-size: 1.05rem;
}

.success-banner span {
  color: #166534;
  font-size: 0.92rem;
}

.error {
  min-height: 1.25em;
  margin: 0;
  color: var(--danger);
  font-size: 0.86rem;
  font-weight: 650;
}

.error:empty {
  display: none;
}

#form-status {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

#form-status.error {
  color: var(--danger);
}

@media (max-width: 760px) {
  .page {
    padding: 16px 12px;
  }

  form {
    gap: 10px;
    padding: 16px;
  }

  .two-column {
    grid-template-columns: 1fr;
  }

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

  .field-half {
    width: 100%;
  }

  .actions {
    align-items: stretch;
  }

  button {
    width: 100%;
  }
}
