:root {
  --ink: #222;
  --muted: #5f5f5f;
  --line: #d6d6d6;
  --line-focus: #222;
  --accent: #e8743b;
  --error: #c62828;
  --bg: #f3f0ec;
  --card: #fff;
  --radius-card: 28px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.35;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
}

.card {
  width: 100%;
  max-width: 520px;
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 40px 28px 32px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .06);
}

/* On phones (Instagram in-app browser) the card fills the screen */
@media (max-width: 560px) {
  body { padding: 0; background: var(--card); }
  .card { border-radius: 0; box-shadow: none; padding: 36px 20px calc(28px + env(safe-area-inset-bottom)); min-height: 100dvh; }
}

h1 {
  margin: 0 0 28px;
  text-align: center;
  font-size: clamp(30px, 8vw, 38px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
h1 strong { font-weight: 700; }

.perks { list-style: none; margin: 0 0 28px; padding: 0; }
.perks li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
  font-size: 17px;
  font-weight: 500;
}
.perks .arrow { width: 22px; height: 22px; color: var(--accent); margin-top: 1px; }

.field { margin-bottom: 14px; }

input[type="text"], input[type="tel"], input[type="email"], select {
  width: 100%;
  height: 58px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 17px; /* ≥16px stops iOS from zooming on focus */
  appearance: none;
  -webkit-appearance: none;
  transition: border-color .15s;
}
input::placeholder { color: var(--muted); opacity: 1; }
input:focus, select:focus { outline: none; border-color: var(--line-focus); box-shadow: 0 0 0 1px var(--line-focus); }

.select-wrap { position: relative; }
.select-wrap::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid #555;
  border-bottom: 2px solid #555;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
select { padding-right: 52px; cursor: pointer; }
select:invalid { color: var(--muted); }
select option { color: var(--ink); }

.invalid input, .invalid select { border-color: var(--error); }
.error { margin: 6px 2px 0; color: var(--error); font-size: 14px; min-height: 0; }
.error:empty { display: none; }
.form-error { text-align: center; margin: 4px 0 12px; }
.send-failed { margin: 0 0 16px; padding: 14px 16px; border-radius: 8px; background: #fdf0ea; border: 1px solid #f3c9b4; text-align: center; font-size: 15px; }
.send-failed p { margin: 0; }
.send-failed p + p { margin-top: 6px; font-weight: 500; }
.send-failed a { color: var(--ink); font-weight: 700; white-space: nowrap; }

.consent-field { margin-top: 18px; margin-bottom: 22px; }
.consent { display: block; font-size: 16px; line-height: 1.5; cursor: pointer; }
.consent input {
  width: 20px; height: 20px;
  margin: 0 8px 0 0;
  vertical-align: -4px;
  accent-color: var(--ink);
}
.consent a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

button[type="submit"] {
  width: 100%;
  height: 60px;
  border: 0;
  border-radius: 999px;
  background: #222;
  color: #fff;
  font: inherit;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .1s, opacity .15s;
}
button[type="submit"]:active { transform: scale(.985); }
button[type="submit"]:disabled { opacity: .6; cursor: progress; }
button[type="submit"]:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.disclaimer { margin: 16px 0 0; text-align: center; color: var(--muted); font-size: 14px; }

.success { text-align: center; padding: 24px 0 8px; outline: none; }
.success .check { width: 64px; height: 64px; color: var(--accent); }
.success h2 { margin: 12px 0 8px; font-size: 26px; letter-spacing: -0.02em; }
.success p { margin: 0; font-size: 17px; color: var(--muted); }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
