/* It's Your Turn To Earn — family-warm site styles. */

:root {
  --paper:   #fbf7f1;
  --paper-2: #f3ede0;
  --ink:     #1f2a26;
  --primary: #2f6f4e;
  --primary-dark: #234f38;
  --accent:  #e8a05a;
  --muted:   #6f7873;
  --line:    #e9e1d1;
  --warm-shadow: 0 6px 20px rgba(31, 42, 38, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.65;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Top bar ───────────────────────────────────────────────────────── */
.topbar {
  padding: 8px 0 0;
  text-align: center;
}
.topbar .brand {
  font-family: Georgia, serif;
  font-size: 22px;
  color: var(--primary);
  letter-spacing: 0.5px;
  font-weight: bold;
}
.topbar .sub {
  color: var(--muted);
  font-size: 14px;
  margin-top: 2px;
}

/* ── Hero ──────────────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 8px 0 28px;
}
.hero h1 {
  font-size: 38px;
  line-height: 1.18;
  margin: 0 0 14px;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.3px;
}
.hero h1 em {
  font-style: normal;
  color: var(--primary);
}
.hero .lede {
  font-size: 19px;
  color: var(--muted);
  max-width: 580px;
  margin: 0 auto;
}

/* ── Video frame ───────────────────────────────────────────────────── */
.video-frame {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin: 28px 0;
  box-shadow: var(--warm-shadow);
}
.video-frame .video-aspect {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: var(--paper-2);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-frame .video-aspect .placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-align: center;
  padding: 24px;
}
.video-frame .video-aspect .placeholder .pill {
  display: inline-block;
  background: #fff;
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  margin-bottom: 8px;
  color: var(--primary);
}
.video-frame iframe,
.video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ── Story block (between video and form) ─────────────────────────── */
.story {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px 28px 22px;
  margin: 28px 0;
  box-shadow: var(--warm-shadow);
}
.story p {
  margin: 0 0 14px;
  font-size: 17px;
}
.story p:last-child { margin-bottom: 0; }
.story .pull {
  font-size: 18px;
  color: var(--primary-dark);
  font-style: italic;
  border-left: 3px solid var(--accent);
  padding-left: 14px;
  margin: 14px 0;
}

/* ── Form ─────────────────────────────────────────────────────────── */
.form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  box-shadow: var(--warm-shadow);
  margin: 28px 0;
}
.form-card h2 {
  margin: 0 0 6px;
  font-size: 24px;
  color: var(--ink);
}
.form-card .form-sub {
  color: var(--muted);
  margin: 0 0 22px;
  font-size: 15px;
}
.field {
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 6px;
  font-weight: 600;
}
.field label .opt {
  color: var(--muted);
  font-weight: 400;
}
.field input[type=text],
.field input[type=email],
.field input[type=tel],
.field textarea,
.field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s, background .15s;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--primary);
  background: #fff;
}
.field .hint {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}
.field .checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}
.field .checkbox input { margin-top: 4px; }

.btn-primary {
  display: inline-block;
  width: 100%;
  padding: 14px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .05s;
  text-align: center;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:active { transform: translateY(1px); }

.btn-link {
  background: transparent;
  border: 0;
  color: var(--primary);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.trust-line {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 14px;
}

/* ── Social proof line ─────────────────────────────────────────────── */
.proof {
  text-align: center;
  font-size: 14px;
  color: var(--primary-dark);
  margin: 0 0 12px;
}
.proof .dot {
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: middle;
}

/* ── Thank-you page ────────────────────────────────────────────────── */
.thanks-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 36px 28px;
  box-shadow: var(--warm-shadow);
  text-align: center;
  margin: 28px 0;
}
.thanks-card h1 {
  font-size: 30px;
  margin: 0 0 8px;
  color: var(--ink);
}
.thanks-card .who {
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 22px;
}
.referrer-card {
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin: 22px 0;
  text-align: left;
}
.referrer-card .avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--paper-2);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--primary);
  border: 1px solid var(--line);
}
.referrer-card .meta .name {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}
.referrer-card .meta .role {
  font-size: 14px;
  color: var(--muted);
}
.next-steps {
  text-align: left;
  margin-top: 22px;
}
.next-steps h3 {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin: 0 0 10px;
}
.next-steps ol {
  margin: 0;
  padding-left: 22px;
}
.next-steps li {
  margin-bottom: 10px;
  font-size: 16px;
}

/* ── Footer ────────────────────────────────────────────────────────── */
.foot {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 32px 0 50px;
}

/* ── Errors / notices ──────────────────────────────────────────────── */
.notice {
  background: #fff7eb;
  border: 1px solid #f3d8a8;
  color: #7a4a13;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: 14px;
}
.notice.error {
  background: #fbeeee;
  border-color: #e6b6b6;
  color: #7a1a1a;
}

/* ── Mobile tweaks ─────────────────────────────────────────────────── */
@media (max-width: 540px) {
  .hero h1 { font-size: 30px; }
  .hero .lede { font-size: 17px; }
  .form-card, .story, .thanks-card { padding: 22px; }
  .video-frame { padding: 10px; }
}

/* ── Admin (lightweight) ───────────────────────────────────────────── */
.admin-shell {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f6f5f0;
  min-height: 100vh;
}
.admin-shell .wrap { max-width: 1100px; padding: 24px 20px; }
.admin-shell h1 { font-family: Georgia, serif; color: var(--primary); }
.admin-shell table {
  width: 100%;
  background: #fff;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  font-size: 14px;
}
.admin-shell th, .admin-shell td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.admin-shell th {
  background: var(--paper-2);
  font-weight: 600;
  color: var(--ink);
}
.admin-shell tr:last-child td { border-bottom: 0; }
.admin-shell .status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--muted);
  font-size: 12px;
  text-transform: capitalize;
}
.admin-shell .status-pill.new { background: #e7f1e9; color: var(--primary-dark); }
.admin-shell .status-pill.converted { background: #e8a05a22; color: #8a4f12; }
.admin-shell .status-pill.dropped { background: #e9e1d1; color: var(--muted); }
.admin-shell .topnav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.admin-shell .topnav a { color: var(--primary); }
.admin-shell .login-card {
  max-width: 380px;
  margin: 80px auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  box-shadow: var(--warm-shadow);
}

/* ── Form sections (clearly labeled groups inside the form) ───────── */
.form-section {
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.form-section:last-of-type {
  border-bottom: 0;
  margin-bottom: 12px;
  padding-bottom: 0;
}
.form-section h3 {
  margin: 0 0 4px;
  font-size: 18px;
  color: var(--primary-dark);
  font-weight: 700;
  letter-spacing: 0.1px;
}
.form-section h3 .opt {
  color: var(--muted);
  font-weight: 400;
  font-size: 14px;
}
.form-section .section-hint {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 14px;
}

/* ── Brand logo in the header ─────────────────────────────────────── */
.topbar .brand-logo {
  max-height: 220px;
  width: auto;
  display: block;
  margin: 0 auto;
}
@media (max-width: 540px) {
  .topbar .brand-logo { max-height: 170px; }
}

/* ── Referrer confirmation card (after picking from autocomplete) ── */
.referrer-confirm {
  display: flex;
  gap: 14px;
  align-items: center;
  background: #e7f1e9;
  border: 1px solid #9bc4a6;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.referrer-confirm .confirm-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  background: #fff;
  flex-shrink: 0;
}
.referrer-confirm .confirm-meta { flex: 1; min-width: 0; }
.referrer-confirm .confirm-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--primary-dark);
  font-weight: 700;
}
.referrer-confirm .confirm-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}
.referrer-confirm .confirm-where {
  font-size: 13px;
  color: var(--muted);
}
.referrer-confirm .confirm-reset {
  font-size: 13px;
  color: var(--primary);
  text-decoration: underline;
  align-self: flex-start;
  margin-top: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Integrity note under the referrer field ─────────────────────── */
.integrity-note {
  background: #fff7eb;
  border: 1px solid #f3d8a8;
  border-radius: 10px;
  padding: 12px 14px;
  margin: 14px 0 0;
  font-size: 13px;
  color: #7a4a13;
  line-height: 1.5;
}
.integrity-note strong { color: #5a3008; }

/* ── Inline referrer error (JS-triggered) ─────────────────────────── */
.referrer-inline-error {
  background: #fbeeee;
  border: 1px solid #e6b6b6;
  color: #7a1a1a;
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 10px;
  font-size: 13px;
}
