:root {
  --green-deep: #1C3A12;
  --green-mid: #2D5219;
  --green-light: #4A7A2C;
  --green-pale: #EBF3E0;
  --green-wash: #F4F8EE;
  --cream: #F7F2E8;
  --cream-dark: #EDE5D4;
  --gold: #8B6914;
  --gold-light: #C4A44E;
  --gold-pale: #FAF3E0;
  --text-dark: #1A2E10;
  --text-mid: #3D5530;
  --text-muted: #6B7F5E;
  --text-light: #A5B896;
  --border: #D4E0C4;
  --border-mid: #B8CDA0;
  --white: #fff;
  --shadow-sm: 0 1px 3px rgba(28,58,18,0.06);
  --shadow-md: 0 4px 16px rgba(28,58,18,0.10);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-display: "Work Sans", sans-serif;
  --font-body: "Work Sans", sans-serif;
  --transition: 0.22s ease;
}
.hidden { display: none !important; }

/* ── HERO ── */
.ref-hero {
	padding: 64px 24px 0;
	text-align: center;
	position: relative;
	overflow: hidden;
	background-repeat: no-repeat;
    background-position: center top;
	background-size: cover;
}

.ref-hero::before {
	content: '';
	position: absolute;
	inset: 0;
	background-color: rgba(0,0,0,.2);
	pointer-events: none;
}

.ref-hero-inner {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  padding-bottom: 52px;
}

.eyebrow {
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	margin-bottom: 14px;
	color: #FAF3E0;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 8vw, 62px);
  font-weight: 500;
  color: #fff;
  line-height: 1.05;
  margin-bottom: 18px;
}

.hero-title em {
	font-style: italic;
	color: var(--gp);
}

.hero-sub {
  font-size: 15px;
  color: rgba(255,255,255,0.62);
  line-height: 1.7;
  max-width: 460px;
  margin: 0 auto;
}

/* ── HOW IT WORKS STRIP ── */
.how-strip {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-bottom: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  max-width: 680px;
  margin: 0 auto;
  padding: 28px 24px;
}

.how-step {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  padding: 0 16px;
}
.how-step div:last-child {
	display: flex;
	flex-direction: column;
	gap: 3px;
}
.how-step strong {
	display: block;
	font-size: 13px;
	font-weight: 500;
	color: var(--white);
	line-height: 1.3;
}

.how-step span {
	display: block;
	font-size: 12px;
	color: rgba(255,255,255, .8);
	line-height: 1.4;
}

.how-num {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background-color: var(--gp);
	border: 1.5px solid rgb(41 131 80 / 45%);
	color: var(--white);
	font-size: 13px;
	font-weight: 500;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	font-family: var(--font-display);
}

.how-divider {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.12);
  flex-shrink: 0;
}

/* ── BODY ── */
.ref-body {
  padding: 48px 0 72px;
}

/* ── CARDS ── */
.ref-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 20px;
}

.ref-card-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  color: var(--green-deep);
  margin-bottom: 6px;
}

.ref-card-sub {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* ── COPY LINK ── */
.link-copy-row {
  display: flex;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition);
}

.link-copy-row:focus-within { border-color: var(--green-light); }

.link-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 13px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-mid);
  background: var(--green-wash);
  cursor: text;
  min-width: 0;
}

.copy-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--green-deep);
  color: #FFFFFF;
  border: none;
  padding: 13px 20px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition);
}

.copy-btn:hover { background: var(--green-mid); }
.copy-btn.copied { background: #2E7D32; }

/* ── SHARE BUTTONS ── */
.share-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: opacity var(--transition), transform var(--transition);
  letter-spacing: 0.02em;
}

.share-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.share-btn--facebook { background: #1877F2; color: #FFFFFF; }
.share-btn--x        { background: #000000; color: #FFFFFF; }
.share-btn--whatsapp { background: #25D366; color: #FFFFFF; }

/* ── EMAIL FORM ── */
.email-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.email-field-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.email-input {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-dark);
  outline: none;
  transition: border-color var(--transition);
  background: var(--white);
}

.email-input:focus { border-color: var(--green-light); }
.email-input::placeholder { color: var(--text-light); }
.email-input.error { border-color: #C0392B; }

.remove-email-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}

.remove-email-btn:hover { background: #FEE2E2; color: #B91C1C; border-color: #FECACA; }

.add-email-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--green-mid);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 0;
  margin-bottom: 20px;
  transition: color var(--transition);
}

.add-email-btn:hover { color: var(--green-light); }
.add-email-btn:disabled { color: var(--text-light); cursor: default; }

.form-error {
  font-size: 13px;
  color: #B91C1C;
  margin-bottom: 12px;
}

.form-actions { display: flex; gap: 12px; }

.send-success {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--green-pale);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 14px;
  color: var(--green-mid);
  margin-top: 16px;
}

.send-success svg { color: var(--green-light); flex-shrink: 0; }

/* ── STATS ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 500;
  color: var(--green-deep);
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.04em;
}

/* ── LOGIN CARD ── */
.login-card, .aw-referrals-well {
  background: #E8F5EE;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  text-align: center;
}

.login-card-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--green-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--green-light);
}

.login-card-title, .aw-referrals-well h4 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  color: var(--green-deep);
  margin-bottom: 10px;
}

.login-card-sub, .aw-referrals-well p:not(:last-child) {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 380px;
  margin: 0 auto 28px;
}

.login-card-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.login-card-note {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.5;
  max-width: 340px;
  margin: 0 auto;
}

/* ── BUTTONS ── */
.btn, .ref-body .woocommerce .aw-referrals-well .button {
  display: inline-block;
  border-radius: var(--radius-md);
  padding: 12px 28px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}

.btn:hover, .ref-body .woocommerce .aw-referrals-well .button:hover { transform: translateY(-1px); }
.btn:active, .ref-body .woocommerce .aw-referrals-well .button:active { transform: translateY(0); }

.btn--primary, .ref-body .woocommerce .aw-referrals-well .button {
  background: var(--green-deep);
  color: #FFFFFF;
  border-color: var(--green-deep);
}

.btn--primary:hover, .ref-body .woocommerce .aw-referrals-well .button:hover { background: var(--green-mid); border-color: var(--green-mid); }

.btn--outline {
  background: transparent;
  color: var(--green-deep);
  border-color: var(--green-deep);
}

.btn--outline:hover { background: var(--green-wash); }

/* ── DEV TOGGLE (remove in production) ── */
.dev-toggle {
  text-align: center;
  padding: 20px;
  border-top: 1px dashed var(--border);
  margin-top: 16px;
}

.dev-toggle button {
  background: none;
  border: 1px dashed var(--border-mid);
  color: var(--text-light);
  font-family: var(--font-body);
  font-size: 12px;
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* ═══════════════════════════
   RESPONSIVE
═══════════════════════════ */

@media (max-width: 680px) {
  .how-strip {
    flex-direction: column;
    gap: 20px;
    padding: 24px 20px;
  }
  .ref-hero::before {
	  background-color: rgba(0, 0, 0, .3);
}

  .how-divider {
    width: 100%;
    height: 1px;
    display: block;
  }

  .how-step { padding: 0; }

  .ref-card { padding: 24px 20px; }

  .share-btns { flex-direction: column; }
  .share-btn  { justify-content: center; }

  .stats-row { grid-template-columns: 1fr 1fr 1fr; }

  .stat-card  { padding: 18px 12px; }
  .stat-num   { font-size: 28px; }
  .stat-label { font-size: 11px; }

  .login-card { padding: 36px 24px; }
  .login-card-actions { flex-direction: column; align-items: center; }
  .btn { width: 100%; text-align: center; max-width: 280px; }

  .link-copy-row { flex-direction: column; border: none; gap: 8px; }
  .link-input { border: 1.5px solid var(--border); border-radius: var(--radius-md); }
  .copy-btn {
    border-radius: var(--radius-md);
    justify-content: center;
    padding: 12px;
  }
}

@media (max-width: 400px) {
  .stats-row { grid-template-columns: 1fr; }
}

/* ── REVEAL ANIMATION ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ref-card, .stats-row, .login-card {
  animation: fadeUp 0.4s ease both;
}

.ref-card:nth-child(1) { animation-delay: 0.05s; }
.ref-card:nth-child(2) { animation-delay: 0.12s; }
.ref-card:nth-child(3) { animation-delay: 0.19s; }
.stats-row             { animation-delay: 0.26s; }

.aw-referrals-share-buttons {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin: 0;
	display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.aw-referrals-share-buttons::before, .aw-referrals-share-buttons::after {
	content: unset;
}
.aw-referrals-share-buttons a.btn {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    transition: opacity var(--transition), transform var(--transition);
    letter-spacing: 0.02em;
	min-width: auto;
}
.aw-referrals-share-buttons a.btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}
.aw-referrals-share-or {
    margin: 1.1rem 0;
}
.ref-body .woocommerce form .form-row {
    margin: 0;
    padding: 0;
    display: block;
}
.ref-body .woocommerce form .form-row .input-text {
	border: 1.5px solid var(--border);
	border-radius: var(--radius-md);
	padding: 12px 16px;
	font-family: var(--font-body);
	font-size: 14px;
	color: var(--char);
	outline: none;
	transition: border-color var(--transition);
	background: var(--white);
}
.ref-body .woocommerce form .form-row .input-text:focus {
    border-color: var(--gp);
}
.aw-email-referral-form {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.email-button {
    grid-column: 1 / -1;
}
.ref-body .woocommerce .email-button .btn {
    display: inline-block;
    border-radius: var(--radius-md);
    padding: 12px 28px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-decoration: none;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
	background-color: var(--gp);
    color: var(--white);
    border-color: var(--gp);
}
.ref-body .woocommerce .email-button .btn:hover {
    background-color: #000;
    border-color: #000;
	transform: translateY(-1px);
}
@media (max-width: 600px) {
	.aw-email-referral-form {
		grid-template-columns: repeat(1, 1fr);
	}
	.ref-body .woocommerce .email-button .btn {
		width: 100%;
		max-width: 100%;
	}
	.ref-hero {
		padding: 24px 13px 0;
	}
	.eyebrow {
		margin-bottom: 6px;
		font-size: 10px;
	}
	.hero-title {
		font-size: 32px;
		margin-bottom: 8px;
	}
	.hero-sub {
		font-size: 14px;
		line-height: 1.5;
		max-width: 100%;
	}
	.ref-hero-inner {
		max-width: 100%;
		margin: 0;
		padding-bottom: 10px;
	}
	.how-strip {
        gap: 10px;
        padding: 10px 12px;
    }
	.how-step {
		gap: 8px;
	}
	.how-num {
		width: 24px;
		height: 24px;
		border: 1px solid rgb(41 131 80 / 45%);
		font-size: 11px;
	}
	.how-step strong {
		font-size: 12px;
	}
	.how-step span {
		font-size: 11px;
	}
	.ref-body {
		padding: 24px 0 36px;
	}
	.login-card, .aw-referrals-well {
		padding: 12px;
	}
	.login-card-title, .aw-referrals-well h4 {
		font-size: 18px;
		margin-bottom: 4px;
	}
	.login-card-sub, .aw-referrals-well p:not(:last-child) {
		font-size: 13px;
		max-width: 100%;
		margin: 0 auto 14px;
	}
	.btn, .ref-body .woocommerce .aw-referrals-well .button {
		padding: 8px 16px;
		font-size: 12px;
		letter-spacing: normal;
		line-height: normal;
	}
	.aw-referrals-share-buttons {
		padding: 14px;
		gap: 6px;
	}
	.aw-referrals-share-buttons a.btn {
		padding: 8px 14px;
		font-size: 12px;
	}
	.aw-referrals-share-or {
		margin: 0.1rem 0;
	}
	.aw-email-referral-form {
		gap: 8px;
	}
}