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

:root {
  --green-dark:   #2D6A4F;
  --green-mid:    #40916C;
  --green-light:  #D8F3DC;
  --bg:           #F7F4F0;
  --white:        #FFFFFF;
  --text:         #1A1A1A;
  --text-muted:   #6B6B6B;
  --border:       #DDD8D0;
  --error:        #C0392B;
  --radius:       10px;
  --shadow:       0 4px 24px rgba(0,0,0,0.08);
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* === Layout === */
.page-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 0 16px 40px;
}

/* === Header === */
header {
  width: 100%;
  max-width: 560px;
  padding: 28px 0 0;
  text-align: center;
}

.logo-link { text-decoration: none; }

.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--green-dark);
  text-transform: uppercase;
}

/* === Hero === */
.hero {
  max-width: 480px;
  text-align: center;
  margin: 32px 0 28px;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--green-dark);
  margin-bottom: 12px;
}

.hero p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* === Card === */
main { width: 100%; max-width: 520px; }

.card {
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* === Field groups === */
.field-group { display: flex; flex-direction: column; gap: 8px; }

.field-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.field-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* === Toggle === */
.toggle-group {
  display: flex;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  gap: 4px;
}

.toggle-btn {
  flex: 1;
  padding: 10px 0;
  border: none;
  border-radius: 7px;
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}

.toggle-btn.active {
  background: var(--white);
  color: var(--green-dark);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* === Amount input === */
.amount-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.18s;
}

.amount-wrap:focus-within { border-color: var(--green-mid); }

.dollar-sign {
  padding: 0 14px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--green-dark);
  background: var(--green-light);
  align-self: stretch;
  display: flex;
  align-items: center;
}

#amount {
  flex: 1;
  border: none;
  outline: none;
  padding: 14px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  background: transparent;
}

#amount::placeholder { color: #C0BDB8; font-weight: 400; }

#amount::-webkit-inner-spin-button,
#amount::-webkit-outer-spin-button { -webkit-appearance: none; }

/* === Email input === */
#email {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.18s;
}

#email:focus { border-color: var(--green-mid); }
#email::placeholder { color: #C0BDB8; }

/* === Stripe card element === */
.stripe-element {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: border-color 0.18s;
  background: var(--white);
}

.stripe-element.StripeElement--focus { border-color: var(--green-mid); }
.stripe-element.StripeElement--invalid { border-color: var(--error); }

.card-errors {
  font-size: 0.82rem;
  color: var(--error);
  min-height: 18px;
}

/* === Submit button === */
.submit-btn {
  width: 100%;
  padding: 16px;
  background: var(--green-dark);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.18s, transform 0.1s;
}

.submit-btn:hover:not(:disabled) { background: var(--green-mid); }
.submit-btn:active:not(:disabled) { transform: scale(0.99); }
.submit-btn:disabled { opacity: 0.65; cursor: not-allowed; }

/* === Spinner === */
.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* === Form error === */
.form-error {
  font-size: 0.85rem;
  color: var(--error);
  text-align: center;
  padding: 10px;
  background: #FDF0EE;
  border-radius: 8px;
}

/* === PayPal alternative === */
.paypal-link {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 16px 0 12px;
}
.paypal-link a {
  color: #2D6A4F;
  text-decoration: underline;
  font-weight: 500;
}
.paypal-link a:hover {
  color: #1B4D33;
}

/* === Trust line === */
.trust-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}

/* === Footer === */
footer {
  margin-top: 32px;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}

footer a { color: var(--green-mid); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* === Utility === */
.hidden { display: none !important; }

/* === Responsive === */
@media (max-width: 540px) {
  .card { padding: 28px 20px; }
  .hero h1 { font-size: 1.65rem; }
}
