/* ╔══════════════════════════════════════════════════════════════╗ */
/* ║  Design tokens (matches desktop brand)                           ║ */
/* ╚══════════════════════════════════════════════════════════════╝ */
:root {
  --brand-50:  #f0f7f4;
  --brand-100: #d4e9dd;
  --brand-300: #6aa843;
  --brand-500: #2e7b4f;
  --brand-600: #1c6f50;
  --brand-700: #15584a;
  --brand-800: #0c6250;
  --brand-900: #07382e;
  --neutral-0:  #FAFAFA;
  --neutral-50: #f7f8f7;
  --neutral-100: #f1f2f1;
  --neutral-200: #e5e7e5;
  --neutral-300: #cfd2cf;
  --neutral-500: #6b726d;
  --neutral-700: #2f3431;
  --neutral-900: #0a0c0b;
  --text-primary: #18342f;
  --text-secondary: #60756f;
  --text-muted: #82948f;
  --divider: #e5e7e5;
  --border-strong: #cfd2cf;
  --shadow-soft: 0 18px 40px rgba(13, 54, 45, 0.08);
  --shadow-card: 0 10px 28px rgba(10, 40, 33, 0.07);
  --shadow-hover: 0 16px 34px rgba(10, 40, 33, 0.12);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --gradient-brand: linear-gradient(135deg, #15584a 0%, #146b5b 50%, #1c6f50 100%);
  --gradient-brand-soft: linear-gradient(135deg, #f0f7f4 0%, #d4e9dd 100%);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html, body {
  background: var(--neutral-50);
  color: var(--text-primary);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* ╔══════════════════════════════════════════════════════════════╗ */
/* ║  Sticky header                                                    ║ */
/* ╚══════════════════════════════════════════════════════════════╝ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--neutral-0);
  border-bottom: 1px solid var(--divider);
  backdrop-filter: saturate(180%) blur(8px);
}
.app-header__inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.app-header__brand { display: flex; align-items: center; }
.app-header__logo { height: 40px; width: auto; object-fit: contain; }

/* ╔══════════════════════════════════════════════════════════════╗ */
/* ║  Page layout                                                     ║ */
/* ╚══════════════════════════════════════════════════════════════╝ */
.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 6px 80px;
}

/* ╔══════════════════════════════════════════════════════════════╗ */
/* ║  Loading skeleton                                                ║ */
/* ╚══════════════════════════════════════════════════════════════╝ */
.loading { display: flex; flex-direction: column; gap: 14px; }
#loading[hidden] { display: none; }
.loading__skeleton {
  background: linear-gradient(90deg, var(--neutral-100) 0%, var(--neutral-200) 50%, var(--neutral-100) 100%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
.loading__skeleton--hero   { width: 112px; height: 112px; border-radius: 50%; margin: 16px auto 8px; }
.loading__skeleton--name   { height: 24px; width: 60%; margin: 8px auto 0; }
.loading__skeleton--bio    { height: 14px; width: 80%; margin: 0 auto; }
.loading__skeleton--contact{ height: 56px; width: 100%; }
.loading__skeleton--cta    { height: 52px; width: 100%; border-radius: 14px; }
@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ╔══════════════════════════════════════════════════════════════╗ */
/* ║  404 state                                                       ║ */
/* ╚══════════════════════════════════════════════════════════════╝ */
.not-found {
  text-align: center;
  padding: 60px 0;
}
.not-found__icon {
  width: 80px; height: 80px;
  border-radius: 24px;
  background: var(--neutral-100);
  color: var(--text-muted);
  display: grid; place-items: center;
  margin: 0 auto 16px;
}
.not-found h2 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.not-found p { color: var(--text-secondary); margin-bottom: 24px; }

/* ╔══════════════════════════════════════════════════════════════╗ */
/* ║  Profile hero card                                                ║ */
/* ╚══════════════════════════════════════════════════════════════╝ */
.hero-card {
  background: linear-gradient(135deg, #f0f7f4 0%, #FAFAFA 50%, #f0f7f4 100%);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 28px 22px 20px;
  margin-bottom: 28px;
  overflow: hidden;
}
.hero-card__top { text-align: center; padding-bottom: 20px; }
.hero__avatar {
  width: 160px; height: 160px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: var(--neutral-0);
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 48px;
  letter-spacing: -0.02em;
  margin: 0 auto 16px;
  box-shadow: 0 12px 28px rgba(15, 88, 74, 0.22);
  object-fit: contain;
  overflow: hidden;
  border: 4px solid var(--neutral-0);
  outline: 2px solid var(--brand-100);
}
.hero__role {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-700);
  background: var(--brand-50);
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.hero__name {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.hero__bio {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 360px;
  margin: 0 auto;
  line-height: 1.6;
  white-space: pre-wrap;
}
.hero-card__divider {
  height: 1px;
  background: var(--divider);
  margin: 0 -22px 18px;
}
.hero-card__contacts {
  display: flex;
  align-items: stretch;
  gap: 0;
}
.hero-card__contact-divider {
  width: 1px;
  background: var(--divider);
  margin: 0 4px;
}
.contact-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 6px;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  transition: background 200ms var(--ease-out);
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
  text-align: left;
}
.contact-action:hover {
  background: linear-gradient(135deg, var(--brand-50) 0%, var(--brand-100) 100%);
  border-radius: 999px;
  text-decoration: none;
}
.contact-action__icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--brand-50);
  color: var(--brand-700);
  display: grid; place-items: center;
  flex-shrink: 0;
  transition: background 200ms var(--ease-out);
}
.contact-action:hover .contact-action__icon {
  background: var(--brand-100);
}
.contact-action__text { min-width: 0; flex: 1; }
.contact-action__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 2px;
}
.contact-action__value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

/* ╔══════════════════════════════════════════════════════════════╗ */
/* ║  Section title                                                   ║ */
/* ╚══════════════════════════════════════════════════════════════╝ */
.section-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
  position: relative;
  padding-left: 14px;
}
.section-title::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 18px;
  background: var(--gradient-brand);
  border-radius: 2px;
}
.section-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 18px;
}

/* ╔══════════════════════════════════════════════════════════════╗ */
/* ║  Products grid                                                   ║ */
/* ╚══════════════════════════════════════════════════════════════╝ */
.products { margin-bottom: 32px; }
.products__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 560px) {
  .products__grid { grid-template-columns: 1fr 1fr 1fr; }
}
.product-card {
  background: var(--neutral-0);
  border: 1.5px solid var(--divider);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-soft);
}
.product-card__icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: grid; place-items: center;
  margin-bottom: 12px;
}
.product-card__icon--funeral  { background: rgba(108, 168, 67, 0.14); color: #1c6f50; }
.product-card__icon--life     { background: rgba(21, 88, 74, 0.12); color: #15584a; }
.product-card__icon--combined { background: var(--brand-50); color: var(--brand-700); }
.product-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}
.product-card p {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ╔══════════════════════════════════════════════════════════════╗ */
/* ║  Enquiry form                                                    ║ */
/* ╚══════════════════════════════════════════════════════════════╝ */
.enquiry { margin-bottom: 32px; }
.form {
  background: var(--neutral-0);
  border: 1.5px solid var(--divider);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
}
.form-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}
.form-progress__step {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--neutral-100);
  color: var(--text-muted);
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 13px;
  transition: all 300ms var(--ease-out);
  flex-shrink: 0;
  cursor: pointer;
}
.form-progress__step.is-current {
  background: var(--gradient-brand);
  color: var(--neutral-0);
  box-shadow: 0 4px 12px rgba(15, 88, 74, 0.25);
  transform: scale(1.1);
}
.form-progress__step.is-done {
  background: var(--brand-700);
  color: var(--neutral-0);
}
.form-progress__line {
  flex: 1;
  height: 2px;
  background: var(--neutral-200);
  margin: 0 6px;
  border-radius: 2px;
  transition: background 300ms var(--ease-out);
}
.form-progress__line.is-done { background: var(--brand-700); }

.form-step { animation: formStepFade 360ms var(--ease-out); }
@keyframes formStepFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.form-step__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}
.form-step__sub {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 16px;
}

.form-group { display: block; margin-bottom: 16px; }
.form-group__label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.form-group__sublabel {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-left: 6px;
}
.required { color: var(--brand-300); }

.form-control {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1.5px solid var(--border-strong);
  border-radius: 12px;
  background: var(--neutral-0);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
  transition: all 180ms var(--ease-out);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control:focus {
  outline: none;
  border-color: var(--brand-700);
  box-shadow: 0 0 0 3px rgba(15, 88, 74, 0.14);
}
.form-control[inputmode="tel"] { letter-spacing: 0.02em; }

/* Radio cards (premium selector style) */
.form-group--radio-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 18px;
}
.form-group--yesno {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.radio-card--yesno {
  text-align: center;
  padding: 20px 16px;
}
.radio-card--yesno .radio-card__content {
  padding-left: 0;
}
.radio-card--yesno .radio-card__title {
  font-size: 16px;
}
.radio-card--yesno:has(input:checked)::before {
  display: none;
}
.radio-card {
  position: relative;
  display: block;
  padding: 14px 16px;
  background: var(--neutral-0);
  border: 1.5px solid var(--border-strong);
  border-radius: 14px;
  cursor: pointer;
  transition: all 200ms var(--ease-out);
}
.radio-card:hover { border-color: var(--brand-300); }
.radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.radio-card__content { padding-left: 28px; }
.radio-card__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.radio-card__subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.radio-card:has(input:checked) {
  background: var(--brand-50);
  border-color: var(--brand-700);
  box-shadow: 0 4px 14px rgba(15, 88, 74, 0.10);
}
.radio-card:has(input:checked)::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--gradient-brand);
  box-shadow: inset 0 0 0 3px var(--neutral-0);
}

/* POPIA consent */
.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: var(--neutral-50);
  border: 1.5px solid var(--divider);
  border-radius: 12px;
  margin-top: 12px;
  cursor: pointer;
  transition: all 200ms var(--ease-out);
}
.consent:hover { border-color: var(--brand-300); }
.consent:has(input:checked) {
  background: var(--brand-50);
  border-color: var(--brand-700);
}
.consent input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.consent__box {
  flex-shrink: 0;
  width: 20px; height: 20px;
  border-radius: 6px;
  background: var(--neutral-0);
  border: 1.5px solid var(--border-strong);
  display: grid;
  place-items: center;
  margin-top: 1px;
  transition: all 180ms var(--ease-out);
}
.consent:has(input:checked) .consent__box {
  background: var(--gradient-brand);
  border-color: var(--brand-700);
}
.consent:has(input:checked) .consent__box::after {
  content: "";
  width: 5px; height: 9px;
  border: solid var(--neutral-0);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-1px);
}
.consent__text {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-primary);
}
.consent__text a { color: var(--brand-700); text-decoration: underline; }

/* Form error / status */
.form-error {
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.2);
  color: #991b1b;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  margin-top: 12px;
  margin-bottom: 12px;
}

/* Form navigation */
.form-nav {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.form-nav .btn--primary { flex: 1; }
.form-nav .btn--ghost { flex: 0 0 auto; }

/* Submit button inside step 3 */
.form-submit {
  width: 100%;
  margin-top: 18px;
}

/* ╔══════════════════════════════════════════════════════════════╗ */
/* ║  Buttons                                                        ║ */
/* ╚══════════════════════════════════════════════════════════════╝ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 20px;
  border-radius: 14px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.005em;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 180ms var(--ease-out);
}
.btn--primary {
  background: var(--gradient-brand);
  color: var(--neutral-0);
  box-shadow: 0 8px 18px rgba(15, 88, 74, 0.22);
}
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(15, 88, 74, 0.28); }
.btn--primary:active { transform: translateY(0); }
.btn--primary:disabled { opacity: 0.55; cursor: not-allowed; }
.btn--secondary {
  background: var(--neutral-0);
  color: var(--brand-700);
  border: 1.5px solid var(--border-strong);
}
.btn--secondary:hover { border-color: var(--brand-700); text-decoration: none; }
.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn--ghost:hover { color: var(--text-primary); text-decoration: none; }

/* ╔══════════════════════════════════════════════════════════════╗ */
/* ║  Footer                                                         ║ */
/* ╚══════════════════════════════════════════════════════════════╝ */
.site-footer {
  text-align: center;
  padding: 24px 0;
  font-size: 12px;
  color: var(--text-muted);
}
.site-footer p { margin-bottom: 6px; }
.site-footer__disclaimer {
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0.75;
  margin-top: 12px;
  line-height: 1.5;
}

/* ╔══════════════════════════════════════════════════════════════╗ */
/* ║  Thank-you screen                                               ║ */
/* ╚══════════════════════════════════════════════════════════════╝ */
.thanks {
  text-align: center;
  padding: 60px 0;
  animation: thanksIn 500ms var(--ease-out);
}
@keyframes thanksIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.thanks__icon {
  width: 88px; height: 88px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: var(--neutral-0);
  display: grid; place-items: center;
  margin: 0 auto 20px;
  box-shadow: 0 12px 32px rgba(15, 88, 74, 0.24);
  animation: thanksPop 600ms var(--ease-out) 100ms backwards;
}
@keyframes thanksPop {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.thanks h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.thanks p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 24px;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}
.thanks__actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ╔══════════════════════════════════════════════════════════════╗ */
/* ║  Responsive (phone-first)                                        ║ */
/* ╚══════════════════════════════════════════════════════════════╝ */
@media (max-width: 380px) {
  .hero__avatar { width: 120px; height: 120px; font-size: 38px; }
  .hero__name { font-size: 22px; }
  .hero-card__contacts { flex-direction: column; gap: 8px; }
  .hero-card__contact-divider { width: auto; height: 1px; margin: 0; }
  .form { padding: 18px; }
}
