:root {
  --primary: #0a5684;
  --primary-dark: #073c61;
  --primary-2: #078bca;
  --accent: #0cc66d;
  --bg: #aee4ff;
  --bg-soft: #eaf7ff;
  --card: rgba(236, 248, 255, 0.78);
  --text: #08314f;
  --muted: #557a99;
  --border: rgba(255, 255, 255, 0.82);
  --shadow: 0 24px 58px rgba(4, 58, 94, 0.2);
  --serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --sans: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 14% 22%, rgba(255, 255, 255, 0.42), transparent 24rem),
    linear-gradient(180deg, #b7e9ff 0%, #aee4ff 48%, #dff4ff 100%);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.55;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.24;
  background-image:
    radial-gradient(circle, rgba(6, 57, 87, 0.22) 0 1px, transparent 1px),
    radial-gradient(circle, rgba(255, 255, 255, 0.45) 0 1px, transparent 1px);
  background-size: 31px 31px, 47px 47px;
  background-position: 0 0, 13px 19px;
  mix-blend-mode: multiply;
}

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

button {
  font-family: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 56px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 clamp(18px, 5vw, 78px);
  background: rgba(248, 253, 255, 0.94);
  border-bottom: 1px solid rgba(10, 86, 132, 0.13);
  box-shadow: 0 8px 22px rgba(7, 60, 97, 0.1);
  backdrop-filter: blur(12px);
}

.brand {
  color: var(--primary);
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 25px);
  font-weight: 700;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(24px, 4vw, 48px);
}

.nav-links a,
.case-link {
  color: #256385;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.nav-links a:hover,
.case-link:hover {
  color: var(--primary-2);
}

.top-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.whatsapp-btn,
.donate-mini {
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.whatsapp-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  color: #04a859;
  background: #d9ffe7;
  box-shadow: 0 8px 18px rgba(10, 86, 132, 0.12);
}

.whatsapp-btn svg {
  width: 25px;
  height: 25px;
  fill: currentColor;
}

.donate-mini {
  gap: 8px;
  min-width: 94px;
  height: 40px;
  padding: 0 20px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, #0796d8, #087fbd);
  font-weight: 900;
  letter-spacing: 0.02em;
  box-shadow: 0 12px 24px rgba(8, 139, 202, 0.28);
}

main {
  position: relative;
  z-index: 1;
}

.hero-shell {
  min-height: calc(100vh - 56px);
  display: flex;
  align-items: center;
  padding: clamp(32px, 4vw, 46px) clamp(18px, 6vw, 88px) 24px;
}

.hero-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.05fr);
  align-items: start;
  gap: clamp(46px, 8vw, 88px);
}

.hero-photo-wrap {
  justify-self: center;
  width: min(410px, 100%);
  aspect-ratio: 1.12 / 1;
  overflow: hidden;
  border: 5px solid rgba(255, 255, 255, 0.94);
  border-radius: 24px;
  background: #fff;
  transform: rotate(-2.1deg);
  filter: drop-shadow(0 30px 36px rgba(6, 60, 98, 0.22));
}

.hero-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 24%;
}

.hero-copy {
  max-width: 560px;
  margin-top: -68px;
  padding-top: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 10px;
  color: #0876a8;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2 {
  font-family: var(--serif);
  color: var(--primary);
  letter-spacing: 0;
}

.hero-copy h1 {
  max-width: 560px;
  margin-bottom: 12px;
  font-size: clamp(40px, 4.8vw, 58px);
  line-height: 1;
  font-weight: 700;
}

.lede {
  max-width: 540px;
  margin-bottom: 26px;
  color: #135e8c;
  font-size: clamp(18px, 1.55vw, 22px);
  line-height: 1.28;
}

.donation-card {
  width: min(528px, 100%);
  padding: 28px 32px 30px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 16px;
  background: rgba(234, 248, 255, 0.66);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.progress-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.progress-label {
  color: #17668f;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.progress-right {
  text-align: right;
}

.progress-amount {
  margin-top: 2px;
  color: var(--primary-dark);
  font-family: var(--serif);
  font-size: 36px;
  line-height: 1.1;
}

.progress-goal {
  color: #386f91;
  font-size: 21px;
  font-weight: 900;
  line-height: 1.25;
  text-align: right;
}

.progress-bar {
  height: 16px;
  margin: 14px 6px 22px 0;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.58);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
}

.progress-fill {
  width: 11.4%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #049bd6, #0d79b6);
}

.btn-pix,
.btn-donate,
.share-btn,
.impact-item {
  border: 0;
  cursor: pointer;
}

.btn-pix {
  width: 100%;
  min-height: 44px;
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(180deg, #0796d8, #087fbd);
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 0 12px 22px rgba(8, 139, 202, 0.22);
}

.btn-pix svg,
.share-btn svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.share-btn {
  width: 100%;
  min-height: 46px;
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 10px;
  color: var(--primary-dark);
  background: rgba(244, 251, 255, 0.72);
  font-size: 14px;
  font-weight: 900;
}

.donation-cta {
  margin-top: 24px;
  min-height: 50px;
}

.contributors {
  margin-top: 14px;
  color: #4282a5;
  font-size: 14px;
  text-align: center;
}

.contributors strong {
  color: var(--primary-dark);
  font-weight: 900;
}

.case-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
  color: #07699a;
  font-size: 15px;
}

.content-section {
  width: min(1080px, calc(100% - 36px));
  margin: 0 auto 28px;
  padding: clamp(30px, 5vw, 56px);
  border-radius: 18px;
  background: rgba(241, 250, 255, 0.72);
  box-shadow: 0 18px 42px rgba(6, 60, 98, 0.12);
}

.section-kicker {
  margin-bottom: 8px;
  color: #0876a8;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.content-section h2 {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.08;
}

.story-grid {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: clamp(28px, 6vw, 70px);
}

.sub {
  margin-top: 10px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 800;
}

.story-body {
  color: #173f5d;
  font-size: 16px;
}

.story-body p + p {
  margin-top: 13px;
}

.story-body strong {
  color: var(--primary-dark);
}

.dropcap::first-letter {
  float: left;
  padding: 7px 10px 0 0;
  color: var(--primary);
  font-family: var(--serif);
  font-size: 50px;
  line-height: 0.85;
}

.clinic-box {
  margin: 18px 0;
  padding: 18px 20px;
  border-left: 5px solid var(--primary-2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.64);
}

.clinic-box h3 {
  margin-bottom: 8px;
  color: var(--primary-dark);
  font-size: 17px;
}

.clinic-box ul {
  display: grid;
  gap: 6px;
  padding-left: 19px;
}

.btn-donate {
  width: 100%;
  min-height: 56px;
  margin-top: 18px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(180deg, #0dbb69, #069657);
  font-size: 17px;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 0 18px 28px rgba(6, 150, 87, 0.26);
}

.impact-section {
  text-align: center;
}

.impact-list {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  text-align: left;
}

.impact-item {
  min-height: 84px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.82);
}

.impact-item:hover {
  transform: translateY(-1px);
}

.pill {
  min-width: 92px;
  padding: 12px 16px;
  border-radius: 999px;
  color: #fff;
  background: var(--primary);
  font-weight: 900;
  text-align: center;
}

.desc {
  font-size: 14px;
  font-weight: 800;
}

.impact-cta {
  max-width: 380px;
  margin: 24px auto 0;
}

.timeline {
  position: relative;
  margin-top: 26px;
  padding-left: 34px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 11px;
  width: 2px;
  background: rgba(7, 118, 168, 0.2);
}

.tl-item {
  position: relative;
  margin-bottom: 18px;
}

.dot {
  position: absolute;
  top: 18px;
  left: -34px;
  width: 24px;
  height: 24px;
  border: 5px solid #c6edff;
  border-radius: 50%;
  background: var(--primary-2);
}

.tl-card {
  padding: 18px 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.tl-card .head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.tl-card h3 {
  color: var(--primary-dark);
  font-family: var(--serif);
  font-size: 18px;
}

.tl-card .head span,
.author {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.tl-card p {
  margin-top: 8px;
  color: #173f5d;
}

.author {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(7, 118, 168, 0.12);
  font-style: italic;
}

footer {
  position: relative;
  z-index: 1;
  padding: 34px 20px 48px;
  color: #4b82a4;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(8, 29, 50, 0.66);
}

.modal-content {
  width: min(460px, 100%);
  max-height: min(92vh, 680px);
  overflow-y: auto;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(3, 25, 43, 0.34);
  animation: modalIn 0.22s ease-out;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid #d9e6ef;
  background: #fff;
}

.modal-header h3 {
  color: var(--primary-dark);
  font-family: var(--serif);
  font-size: 19px;
}

.modal-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: var(--primary);
  background: var(--bg-soft);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.modal-body {
  padding: 26px 20px 20px;
}

.modal-help,
.secure-note {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.modal-help {
  margin-bottom: 16px;
}

.secure-note {
  margin-top: 10px;
  font-size: 12px;
}

.modal-amount-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.btn-amount {
  position: relative;
  min-height: 54px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: #0876a8;
  cursor: pointer;
  font-size: 16px;
  font-weight: 900;
}

.btn-amount.popular {
  background: var(--primary-dark);
}

.badge-popular {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 8px;
  border-radius: 999px;
  color: #fff;
  background: #ff9c22;
  font-size: 9px;
  font-weight: 900;
}

.display-amount {
  margin: 6px 0 18px;
  color: var(--primary);
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
  text-align: center;
}

input[type="text"] {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #cbdce8;
  border-radius: 10px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
}

.error-msg {
  margin-top: 8px;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 800;
}

.loading {
  min-height: 122px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.qr-wrap {
  display: flex;
  justify-content: center;
  padding: 16px;
  border: 2px solid #d9effb;
  border-radius: 12px;
  background: #fff;
}

.qr-wrap img,
.qr-wrap canvas {
  max-width: 240px;
}

.pix-copy-block {
  margin-top: 14px;
}

.pix-copy-block label {
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 900;
}

.copy-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.copy-row input {
  flex: 1;
  min-width: 0;
  background: #f2f7fb;
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 12px;
}

.copy-row button {
  border: 0;
  border-radius: 8px;
  background: var(--primary-2);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  padding: 0 16px;
}

.expire {
  margin-top: 14px;
  padding: 12px;
  border-left: 4px solid var(--primary-2);
  border-radius: 8px;
  background: #eff8ff;
  color: var(--text);
  font-size: 13px;
}

.steps {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.steps p {
  margin-bottom: 6px;
  color: var(--text);
  font-weight: 900;
}

.steps ol {
  margin-left: 18px;
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: 1fr auto;
    padding-inline: 18px;
  }

  .nav-links {
    display: none;
  }

  .hero-shell {
    min-height: auto;
    padding: 28px 18px 24px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .hero-photo-wrap {
    width: min(360px, 88vw);
    order: 1;
  }

  .hero-copy {
    order: 2;
    margin-top: 0;
    max-width: none;
    text-align: left;
  }

  .hero-copy h1 {
    font-size: clamp(34px, 11vw, 48px);
  }

  .donation-card {
    padding: 22px;
  }

  .content-section,
  .story-grid {
    width: calc(100% - 28px);
    grid-template-columns: 1fr;
    padding: 26px 20px;
  }

  .impact-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .topbar {
    height: 54px;
  }

  .brand {
    font-size: 20px;
  }

  .whatsapp-btn {
    width: 38px;
    height: 38px;
  }

  .donate-mini {
    min-width: 82px;
    padding-inline: 15px;
  }

  .hero-shell {
    padding-top: 22px;
  }

  .hero-copy {
    text-align: center;
  }

  .eyebrow {
    justify-content: center;
  }

  .lede {
    margin-inline: auto;
    font-size: 17px;
  }

  .progress-amount {
    font-size: 30px;
  }

  .progress-goal {
    font-size: 18px;
  }

  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal-content {
    width: 100%;
    border-radius: 18px 18px 0 0;
  }

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

  .copy-row {
    flex-direction: column;
  }

  .copy-row button {
    min-height: 42px;
  }
}
