:root {
  --navy: #071f45;
  --navy-2: #0d356c;
  --navy-3: #174f91;
  --magenta: #c41472;
  --magenta-dark: #991054;
  --green: #168a47;
  --green-dark: #0d6c35;
  --white: #ffffff;
  --ink: #10223c;
  --muted: #53647a;
  --surface: #f4f7fb;
  --line: #dce5f0;
  --gold: #ffb21c;
  --danger: #b42318;
  --shadow: 0 18px 45px rgba(7, 31, 69, 0.12);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 13px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
}

body {
  min-width: 280px;
  margin: 0;
  background:
    radial-gradient(circle at 10% 4%, rgba(196, 20, 114, 0.11), transparent 25rem),
    radial-gradient(circle at 92% 24%, rgba(23, 79, 145, 0.12), transparent 27rem),
    var(--surface);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input,
a {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

button,
a {
  touch-action: manipulation;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 4px solid rgba(255, 178, 28, 0.65);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  transform: translateY(-180%);
  border-radius: 10px;
  background: var(--white);
  color: var(--navy);
  padding: 0.8rem 1rem;
  font-weight: 800;
}

.skip-link:focus {
  transform: none;
}

.page-shell {
  width: min(100%, 780px);
  margin: 0 auto;
  padding: 0 0.85rem 2.5rem;
}

.hero {
  overflow: hidden;
  margin: 0 -0.85rem 1rem;
  border-radius: 0 0 28px 28px;
  background: linear-gradient(145deg, #061b3d, #0d356c 67%, #5c1245);
  box-shadow: var(--shadow);
  color: var(--white);
}

.hero-title-wrap {
  padding: max(1.1rem, env(safe-area-inset-top)) 1.2rem 1rem;
}

.eyebrow {
  margin: 0 0 0.25rem;
  color: #cfe2ff;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(1.75rem, 6.8vw, 3rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 1;
  background: #0b2b5b;
}

.hero-image::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(110deg, transparent 28%, rgba(255, 255, 255, 0.12) 48%, transparent 65%);
  transform: translateX(-120%);
  animation: softShine 8s ease-in-out infinite;
  pointer-events: none;
}

.hero-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  animation: gentleZoom 14s ease-in-out infinite alternate;
}

.conversation,
.results {
  display: grid;
  gap: 1rem;
}

.step,
.results {
  scroll-margin-top: 1rem;
}

.step {
  animation: revealStep 0.42s ease-out both;
}

.assistant-row {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: start;
  gap: 0.65rem;
}

.assistant-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: linear-gradient(145deg, var(--magenta), #7b0e4a);
  box-shadow: 0 7px 18px rgba(196, 20, 114, 0.25);
  color: var(--white);
  font-weight: 900;
}

.message {
  border-radius: 4px var(--radius-md) var(--radius-md) var(--radius-md);
  background: var(--white);
  box-shadow: 0 8px 25px rgba(7, 31, 69, 0.08);
  padding: 1rem 1.05rem;
}

.message p {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 750;
  line-height: 1.42;
}

.message .message-detail {
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.97rem;
  font-weight: 600;
}

.message .friendly-line {
  margin-bottom: 0.35rem;
  color: var(--magenta-dark);
  font-size: 0.98rem;
}

.typing-message {
  display: flex;
  width: 76px;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.8rem;
}

.typing-message span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--navy-3);
  animation: typingBounce 1s ease-in-out infinite;
}

.typing-message span:nth-child(2) {
  animation-delay: 140ms;
}

.typing-message span:nth-child(3) {
  animation-delay: 280ms;
}

.answer-form,
.people-form {
  margin: 0.7rem 0 0 2.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 24px rgba(7, 31, 69, 0.06);
  padding: 0.95rem;
}

label {
  display: block;
  margin: 0 0 0.38rem;
  color: var(--navy);
  font-size: 0.88rem;
  font-weight: 850;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

input {
  width: 100%;
  min-height: 58px;
  border: 2px solid #c9d5e5;
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  padding: 0.8rem 0.9rem;
  font-size: 1.08rem;
  font-weight: 650;
  caret-color: var(--magenta);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input::placeholder {
  color: #7a899b;
  font-weight: 500;
}

input:focus {
  border-color: var(--navy-3);
  box-shadow: 0 0 0 4px rgba(23, 79, 145, 0.13);
  outline: 0;
}

.button {
  display: inline-flex;
  width: 100%;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 0;
  border-radius: 15px;
  padding: 0.85rem 1rem;
  color: var(--white);
  font-size: 0.96rem;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 9px 22px rgba(7, 31, 69, 0.18);
  transition: transform 120ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.button:hover {
  filter: brightness(1.06);
  box-shadow: 0 12px 27px rgba(7, 31, 69, 0.22);
}

.button:active {
  transform: translateY(2px) scale(0.995);
}

.button-navy {
  margin-top: 0.75rem;
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
}

.button-magenta {
  background: linear-gradient(135deg, var(--magenta), var(--magenta-dark));
}

.button-green {
  background: linear-gradient(135deg, #1a9a50, var(--green-dark));
  box-shadow: 0 12px 28px rgba(22, 138, 71, 0.28);
}

.field-error,
.choice-error {
  min-height: 0;
  margin: 0.45rem 0 0;
  color: var(--danger);
  font-size: 0.92rem;
  font-weight: 750;
}

.field-error:empty,
.choice-error:empty {
  display: none;
}

.user-answer {
  width: fit-content;
  max-width: calc(100% - 2.85rem);
  margin: 0.7rem 0 0 auto;
  border-radius: var(--radius-md) 4px var(--radius-md) var(--radius-md);
  background: var(--navy);
  color: var(--white);
  padding: 0.8rem 0.9rem;
  font-size: 1rem;
  font-weight: 750;
  animation: revealStep 0.3s ease-out both;
}

.edit-answer {
  margin-left: 0.65rem;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: #cfe2ff;
  padding: 0;
  font-size: 0.83rem;
  font-weight: 800;
  cursor: pointer;
}

.people-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(88px, 0.36fr);
  gap: 0.7rem;
}

.add-button {
  margin-top: 0.15rem;
}

.add-button span {
  font-size: 1.35rem;
  line-height: 1;
}

.people-list {
  display: grid;
  gap: 0.55rem;
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
}

.person-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  gap: 0.5rem;
  min-height: 52px;
  border: 1px solid #c9d7e8;
  border-left: 5px solid var(--magenta);
  border-radius: 13px;
  background: #f7faff;
  padding: 0.42rem 0.42rem 0.42rem 0.78rem;
  animation: revealStep 0.25s ease-out both;
}

.person-item span {
  overflow-wrap: anywhere;
  color: var(--navy);
  font-weight: 800;
}

.remove-person {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 11px;
  background: #ffe8f2;
  color: #92104f;
  font-size: 1.35rem;
  font-weight: 900;
  cursor: pointer;
}

.finish-button {
  margin-top: 0.95rem;
}

.results {
  margin-top: 1.2rem;
  animation: revealStep 0.5s ease-out both;
}

.results-heading {
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: start;
  gap: 0.8rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--navy), #0b3975);
  box-shadow: var(--shadow);
  color: var(--white);
  padding: 1.15rem;
}

.success-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 16px;
  background: var(--green);
  color: var(--white);
  font-size: 1.65rem;
  font-weight: 900;
}

.section-kicker {
  margin: 0 0 0.1rem;
  color: #cfe2ff;
  font-size: 0.94rem;
  font-weight: 800;
}

.results-heading h2 {
  margin: 0;
  font-size: clamp(1.35rem, 5vw, 2.15rem);
  line-height: 1.16;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.send-status {
  width: fit-content;
  margin: -0.45rem 0 0 0.5rem;
  border: 1px solid #c7d6e7;
  border-radius: 999px;
  background: var(--white);
  color: var(--muted);
  padding: 0.45rem 0.75rem;
  font-size: 0.84rem;
  font-weight: 750;
}

.send-status.sent {
  border-color: #acd6bc;
  background: #ecf9f0;
  color: #116335;
}

.choice-heading {
  margin-top: 0.2rem;
}

.choice-heading h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.38rem;
  line-height: 1.2;
}

.choice-heading p {
  margin: 0.18rem 0 0;
  color: var(--muted);
  font-weight: 600;
}

.options-grid {
  display: grid;
  gap: 0.85rem;
}

.plan-option {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 2px solid #d1dce9;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: 0 12px 30px rgba(7, 31, 69, 0.09);
  color: var(--ink);
  padding: 0;
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, transform 160ms ease, box-shadow 180ms ease;
}

.plan-option:hover {
  transform: translateY(-2px);
  border-color: #7fa3cc;
}

.plan-option[aria-pressed="true"] {
  border-color: var(--magenta);
  box-shadow: 0 0 0 4px rgba(196, 20, 114, 0.12), 0 16px 35px rgba(7, 31, 69, 0.14);
}

.plan-option[aria-pressed="true"]::after {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--magenta);
  color: var(--white);
  content: "✓";
  font-size: 1.1rem;
  font-weight: 900;
}

.option-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  border-bottom: 1px solid #e0e8f1;
  background: #f6f9fd;
  padding: 0.85rem 3.4rem 0.85rem 1rem;
}

.option-label {
  color: var(--magenta);
  font-size: 0.88rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.lowest-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: #eaf9f0;
  box-shadow: inset 0 0 0 1px #8bcba4;
  color: #116335;
  padding: 0.3rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.035em;
  line-height: 1.1;
  text-align: center;
}

.option-body {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
}

.plan-part {
  border-radius: 15px;
  background: #f4f8fd;
  padding: 0.8rem;
}

.plan-part.senior-part {
  background: #fff5fa;
}

.plan-chip {
  display: inline-flex;
  margin-bottom: 0.45rem;
  border-radius: 999px;
  background: var(--navy);
  color: var(--white);
  padding: 0.24rem 0.55rem;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.senior-part .plan-chip {
  background: var(--magenta);
}

.plan-part p,
.plan-part ul {
  margin: 0;
}

.plan-part ul {
  display: grid;
  gap: 0.25rem;
  margin-top: 0.35rem;
  padding-left: 1.15rem;
}

.option-total {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.7rem;
  border-top: 1px solid #e0e8f1;
  padding: 0.9rem 1rem 1rem;
}

.option-total span {
  color: var(--muted);
  font-weight: 750;
}

.option-total strong {
  color: var(--navy);
  font-size: clamp(1.35rem, 6vw, 1.8rem);
  line-height: 1;
  white-space: nowrap;
}

.option-total small {
  font-size: 0.74rem;
}

.option-action {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  margin: 0 1rem 1rem;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--magenta), #e51a86);
  box-shadow: 0 8px 20px rgba(196, 20, 114, 0.23);
  color: var(--white);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 950;
  letter-spacing: 0.035em;
  line-height: 1.15;
  text-align: center;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.plan-option[aria-pressed="true"] .option-action {
  background: #eaf9f0;
  box-shadow: inset 0 0 0 2px #239652;
  color: #116335;
}

.whatsapp-choice-note {
  margin: 0.15rem 0 -0.25rem;
  border: 1px solid #b7dbc5;
  border-radius: 16px;
  background: #eef9f2;
  color: #174f30;
  padding: 0.8rem 0.9rem;
  font-size: 1rem;
  line-height: 1.4;
  text-align: center;
}

.funeral-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 2px solid rgba(69, 142, 225, 0.75);
  border-radius: 28px;
  background: linear-gradient(155deg, #061a3a, #0c3268 70%, #45113b);
  box-shadow: 0 0 0 5px rgba(23, 79, 145, 0.08), 0 24px 55px rgba(7, 31, 69, 0.24);
  color: #eef6ff;
  padding: 1.3rem 1.1rem;
}

.funeral-glow {
  position: absolute;
  z-index: -1;
  top: -80px;
  right: -80px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(196, 20, 114, 0.34);
  filter: blur(30px);
  animation: breatheGlow 5s ease-in-out infinite alternate;
}

.funeral-card h3 {
  margin: 0 0 1rem;
  color: var(--white);
  font-size: clamp(1.4rem, 5.8vw, 2rem);
  line-height: 1.2;
}

.funeral-card p {
  margin: 0 0 1rem;
  font-size: 1rem;
  line-height: 1.66;
}

.funeral-card strong {
  color: var(--white);
}

.funeral-card .handle {
  margin: 1.15rem 0 0;
  color: #c4d5ea;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-align: right;
}

.whatsapp-cta {
  min-height: 64px;
  margin-top: 0.15rem;
  padding: 1rem 1.15rem;
}

.accordion {
  display: grid;
  gap: 0.7rem;
}

.accordion-card {
  scroll-margin-top: 1rem;
  overflow: hidden;
  border: 1px solid #cbd8e7;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: 0 8px 24px rgba(7, 31, 69, 0.07);
}

.accordion-card h3 {
  margin: 0;
}

.accordion-trigger {
  display: grid;
  width: 100%;
  min-height: 65px;
  grid-template-columns: 1fr 38px;
  align-items: center;
  gap: 0.7rem;
  border: 0;
  background: var(--white);
  color: var(--navy);
  padding: 0.8rem 0.85rem 0.8rem 1rem;
  text-align: left;
  cursor: pointer;
}

.accordion-trigger span:first-child {
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.3;
}

.accordion-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: #eaf1fa;
  color: var(--navy);
  font-size: 1.4rem;
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.accordion-trigger[aria-expanded="true"] {
  background: var(--navy);
  color: var(--white);
}

.accordion-trigger[aria-expanded="true"] .accordion-icon {
  transform: rotate(45deg);
  background: var(--magenta);
  color: var(--white);
}

.accordion-panel {
  border-top: 1px solid var(--line);
  padding: 1rem;
  animation: revealPanel 0.28s ease-out both;
}

.accordion-panel p {
  margin: 0 0 0.85rem;
}

.accordion-panel ul,
.accordion-panel ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

.accordion-panel li + li {
  margin-top: 0.38rem;
}

.accordion-panel h4 {
  margin: 1.15rem 0 0.65rem;
  color: var(--navy);
  font-size: 1.13rem;
}

.accordion-panel h5 {
  margin: 1rem 0 0.35rem;
  color: var(--magenta-dark);
  font-size: 0.94rem;
  letter-spacing: 0.05em;
}

.plan-benefits {
  margin-top: 1rem;
  border: 1px solid #cbd9e9;
  border-left: 5px solid var(--navy-3);
  border-radius: 15px;
  background: #f4f8fd;
  padding: 0.85rem;
}

.plan-benefits.senior-benefits {
  border-left-color: var(--magenta);
  background: #fff5fa;
}

.plan-benefits h4 {
  margin-top: 0;
}

.plan-benefits p:last-child {
  margin-bottom: 0;
}

.contract-steps {
  counter-reset: contract;
  display: grid;
  gap: 0.7rem;
  padding: 0 !important;
  list-style: none;
}

.contract-steps li {
  position: relative;
  min-height: 40px;
  padding: 0.45rem 0 0 3rem;
}

.contract-steps li::before {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: var(--navy);
  color: var(--white);
  content: counter(list-item);
  font-weight: 900;
}

.final-cta {
  margin-top: 0.2rem;
}

.site-footer {
  display: flex;
  width: min(100%, 780px);
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 auto;
  border-top: 1px solid #cbd8e7;
  padding: 1.3rem 1rem calc(1.3rem + env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
  font-weight: 850;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.footer-links a {
  color: var(--navy-2);
  font-weight: 800;
}

.is-hidden,
[hidden] {
  display: none !important;
}

@keyframes gentleZoom {
  from { transform: scale(1); }
  to { transform: scale(1.035); }
}

@keyframes softShine {
  0%, 64% { transform: translateX(-125%); }
  82%, 100% { transform: translateX(125%); }
}

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

@keyframes revealPanel {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes typingBounce {
  0%, 60%, 100% { opacity: 0.35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-5px); }
}

@keyframes breatheGlow {
  from { opacity: 0.55; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1.15); }
}

@media (min-width: 640px) {
  .page-shell {
    padding-inline: 1.2rem;
  }

  .hero {
    margin: 1rem 0 1.25rem;
    border-radius: 30px;
  }

  .hero-title-wrap,
  .funeral-card {
    padding-inline: 1.55rem;
  }

  .conversation,
  .results {
    gap: 1.2rem;
  }

  .answer-form,
  .people-form {
    margin-left: 3rem;
    padding: 1.15rem;
  }

  .options-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plan-option:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 360px) {
  .page-shell {
    padding-inline: 0.55rem;
  }

  .hero {
    margin-inline: -0.55rem;
  }

  .answer-form,
  .people-form {
    margin-left: 0;
  }

  .people-fields {
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 0.45rem;
  }

  input {
    padding-inline: 0.7rem;
  }

  .option-total {
    align-items: start;
    flex-direction: column;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
