@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;1,400&family=Source+Sans+3:wght@400;600&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --cream: #faf6f0;
  --paper: #f4ede2;
  --warm-brown: #8b5e3c;
  --dark-brown: #3d2b1f;
  --ink: #2c1a0e;
  --muted: #9b8677;
  --border: #d4c4b0;
  --accent: #c0724a;
  --accent-hover: #a85e3a;
  --success: #5a8a5a;
  --error: #c0453a;
}

html {
  font-size: 16px;
}

body {
  background-color: var(--cream);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: 'Source Sans 3', sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  padding: 2rem 1rem;
}

.page-wrapper {
  max-width: 680px;
  margin: 0 auto;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.stamp-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.5rem;
}

h1 {
  font-family: 'Lora', serif;
  font-size: 2rem;
  color: var(--dark-brown);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.tagline {
  color: var(--muted);
  font-style: italic;
  font-family: 'Lora', serif;
  font-size: 1rem;
  margin-top: 0.25rem;
}

/* Card */
.card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2rem;
  box-shadow:
    0 1px 3px rgba(61, 43, 31, 0.08),
    0 4px 16px rgba(61, 43, 31, 0.04);
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--warm-brown));
  border-radius: 4px 4px 0 0;
}

/* Sections */
.form-section {
  margin-bottom: 1.75rem;
}

.form-section:last-of-type {
  margin-bottom: 0;
}

.section-title {
  font-family: 'Lora', serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Form grid */
.form-row {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.form-row.two-col {
  grid-template-columns: 1fr 1fr;
}

.form-row:last-child {
  margin-bottom: 0;
}

/* Labels & inputs */
label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--dark-brown);
  margin-bottom: 0.3rem;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(192, 114, 74, 0.15);
}

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

.char-counter {
  text-align: right;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.char-counter.warning {
  color: var(--accent);
}

.char-counter.over {
  color: var(--error);
  font-weight: 600;
}

/* Photo upload */
.photo-upload-area {
  border: 2px dashed var(--border);
  border-radius: 4px;
  background: rgba(255,255,255,0.5);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
}

.photo-upload-area:hover,
.photo-upload-area.drag-over {
  border-color: var(--accent);
  background: rgba(192, 114, 74, 0.04);
}

.photo-upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
}

.upload-label {
  font-size: 0.9rem;
  color: var(--muted);
}

.upload-label strong {
  color: var(--accent);
}

.photo-preview {
  display: none;
  margin-top: 1rem;
  position: relative;
}

.photo-preview img {
  max-width: 100%;
  max-height: 200px;
  border-radius: 3px;
  border: 1px solid var(--border);
  object-fit: cover;
}

.photo-preview .remove-photo {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--error);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Divider */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.75rem 0;
}

/* Price block */
.price-block {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(192, 114, 74, 0.06);
  border: 1px solid rgba(192, 114, 74, 0.2);
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.price-description {
  font-size: 0.875rem;
  color: var(--dark-brown);
  line-height: 1.4;
}

.price-description small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 0.15rem;
}

.price-amount {
  font-family: 'Lora', serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--dark-brown);
  white-space: nowrap;
  margin-left: 1rem;
}

/* Submit button */
.btn-submit {
  width: 100%;
  padding: 0.9rem 1.5rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 4px;
  font-family: 'Lora', serif;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 6px rgba(192, 114, 74, 0.3);
}

.btn-submit:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(192, 114, 74, 0.35);
}

.btn-submit:active {
  transform: translateY(1px);
  box-shadow: 0 1px 4px rgba(192, 114, 74, 0.25);
}

.btn-submit:disabled {
  background: var(--muted);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-submit .btn-text { display: inline; }
.btn-submit .btn-loading { display: none; }

.btn-submit.loading .btn-text { display: none; }
.btn-submit.loading .btn-loading { display: inline; }

/* Error / status messages */
.form-error {
  background: rgba(192, 69, 58, 0.08);
  border: 1px solid rgba(192, 69, 58, 0.3);
  border-radius: 3px;
  color: var(--error);
  font-size: 0.875rem;
  padding: 0.75rem 1rem;
  margin-top: 1rem;
  display: none;
}

.form-error.visible {
  display: block;
}

/* Fine print */
.fine-print {
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.75rem;
  line-height: 1.5;
}

.fine-print a {
  color: var(--warm-brown);
  text-decoration: none;
}

.fine-print a:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--muted);
  font-family: 'Lora', serif;
  font-style: italic;
}

/* Responsive */
@media (max-width: 500px) {
  body {
    padding: 1rem 0.75rem;
  }

  h1 {
    font-size: 1.6rem;
  }

  .card {
    padding: 1.25rem;
  }

  .form-row.two-col {
    grid-template-columns: 1fr;
  }

  .price-block {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .price-amount {
    margin-left: 0;
  }
}
