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

:root {
  --bg:           #F7F3EE;
  --card:         #FFFFFF;
  --green:        #1B4332;
  --green-hover:  #2D6A4F;
  --green-light:  #D1FAE5;
  --terra:        #C4784E;
  --text:         #1A1917;
  --muted:        #7A7168;
  --border:       #E2D9CF;
  --radius:       14px;
  --radius-sm:    8px;
}

html { font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  -webkit-font-smoothing: antialiased;
}

/* ── Card ── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 40px 32px 36px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04), 0 8px 32px rgba(27,67,50,.06);
}

/* ── Brand ── */
.brand {
  text-align: center;
  margin-bottom: 28px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--green);
  margin-bottom: 14px;
}

.brand-mark svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.restaurant-name {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.15;
  color: var(--text);
}

.tagline {
  margin-top: 6px;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--terra);
}

/* ── Divider ── */
.divider {
  width: 36px;
  height: 1px;
  background: var(--border);
  margin: 24px auto;
}

/* ── Copy ── */
.headline {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  color: var(--text);
  margin-bottom: 10px;
}

.subheadline {
  font-size: .9rem;
  line-height: 1.6;
  color: var(--muted);
  text-align: center;
  margin-bottom: 28px;
}

/* ── Form ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

label.field-label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}

input[type="email"] {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
}

input[type="email"]::placeholder { color: #BAAD9E; }

input[type="email"]:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(27,67,50,.1);
}

input[type="email"].error {
  border-color: #DC2626;
  box-shadow: 0 0 0 3px rgba(220,38,38,.1);
}

/* ── Consent ── */
.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.consent-row input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--green);
  cursor: pointer;
}

.consent-text {
  font-size: .82rem;
  line-height: 1.55;
  color: var(--muted);
}

.consent-text a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Error message ── */
.field-error {
  font-size: .8rem;
  color: #DC2626;
  margin-top: -4px;
  display: none;
}
.field-error.visible { display: block; }

/* ── Submit button ── */
.btn-submit {
  width: 100%;
  padding: 14px 16px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  transition: background .15s, transform .1s, opacity .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  -webkit-appearance: none;
}

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

.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: none;
}
.btn-submit.loading .spinner { display: block; }
.btn-submit.loading .btn-label { opacity: .8; }

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

/* ── Success state ── */
.success-state {
  display: none;
  text-align: center;
  animation: fadeUp .4s ease;
}

.success-state.visible { display: block; }
.form-state.hidden { display: none; }

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

.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--green-light);
  margin-bottom: 16px;
}

.success-icon svg {
  width: 26px;
  height: 26px;
  stroke: var(--green);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.success-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.success-copy {
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ── Alert (API error) ── */
.alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  line-height: 1.5;
  display: none;
  margin-top: 4px;
}

.alert.error {
  background: #FEF2F2;
  color: #991B1B;
  border: 1px solid #FCA5A5;
  display: block;
}

/* ── Footer ── */
footer {
  margin-top: 20px;
  text-align: center;
  font-size: .78rem;
  color: #A89B8C;
}

footer a {
  color: #A89B8C;
  text-decoration: underline;
  text-underline-offset: 2px;
}

footer a:hover { color: var(--muted); }

/* ── Desktop padding ── */
@media (min-width: 520px) {
  .card { padding: 48px 40px 44px; }
}
