/* DCP design system. Every colour, font and radius comes from the theme as a CSS variable,
   set in the page head from theme.json; nothing brand-specific is written here. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
}
:lang(hi) body, body:lang(hi) { line-height: 1.7; }
img { max-width: 100%; height: auto; }
a { color: var(--logo-blue); text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-heading); line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: 1.75rem; font-weight: 800; }
h2 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1rem; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Header and hero, on the brand's dark background */
.site-header {
  background: var(--brand-navy);
  color: var(--text-on-dark);
}
.site-header__bar {
  max-width: 30rem; margin: 0 auto; padding: .75rem 1rem;
  display: flex; align-items: center; gap: .75rem;
}
.site-header__logo { height: 1.75rem; width: auto; display: block; }
.site-header__title { font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem; }
.lang-switch { margin-left: auto; display: flex; gap: .25rem; }
.lang-switch a {
  color: var(--text-on-dark); text-decoration: none; font-weight: 600; font-size: .95rem;
  min-width: 2.75rem; min-height: 2.75rem; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-button); border: 1.5px solid transparent;
}
.lang-switch a[aria-current="true"] { border-color: var(--brand-gold); color: var(--brand-gold); }
.hero { max-width: 30rem; margin: 0 auto; padding: .5rem 1rem 3.5rem; }
.hero h1 { color: var(--text-on-dark); }
.hero h1 em { font-style: normal; color: var(--brand-gold); }
.hero__rule { width: 4.5rem; height: 4px; border-radius: 2px; background: var(--brand-gold); margin: .75rem 0; }
.hero p { color: var(--text-on-dark); opacity: .92; margin: 0; }
/* Banner with the theme's hero image: below the text, flush right, its base resting on the card. */
.hero--image { padding-bottom: 2.5rem; }
.hero__image {
  display: block; width: 78%; max-width: 21rem; height: auto; margin: .25rem -1rem 0 auto;
  pointer-events: none; user-select: none;
}
.page { position: relative; z-index: 2; }

/* Main card, lifted over the hero */
.page { max-width: 30rem; margin: -2.5rem auto 0; padding: 0 1rem 2rem; }
.card {
  background: var(--surface); border-radius: var(--radius-card);
  box-shadow: 0 1px 2px rgba(16, 36, 60, .08), 0 8px 24px rgba(16, 36, 60, .08);
  padding: 1.25rem;
}
.card + .card { margin-top: 1rem; }

/* Step indicator */
.steps { margin-bottom: 1.25rem; }
.steps__label { font-size: .9rem; color: var(--text-muted); font-weight: 500; }
.steps__bar { display: flex; gap: .375rem; margin-top: .375rem; }
.steps__bar span { flex: 1; height: 6px; border-radius: 3px; background: var(--border-subtle); }
.steps__bar span.done { background: var(--brand-navy); }
.steps__bar span.current { background: var(--brand-gold); }

/* Target the link fixes */
.target {
  display: flex; gap: .75rem; align-items: center;
  background: var(--notice-surface); border-radius: 12px; padding: .75rem 1rem; margin-bottom: 1.25rem;
}
.target__label { font-size: .85rem; color: var(--text-muted); display: block; }
.target__name { font-weight: 600; }

/* Amount choices: real radio buttons, styled as large tap targets */
.amounts { display: grid; grid-template-columns: 1fr 1fr; gap: .625rem; border: 0; padding: 0; margin: 0 0 1rem; }
.amounts legend { font-weight: 600; margin-bottom: .5rem; padding: 0; }
.amount input { position: absolute; opacity: 0; }
.amount span {
  display: flex; align-items: center; justify-content: center; min-height: 3.5rem;
  border: 1.5px solid var(--border-subtle); border-radius: 12px; background: var(--surface);
  font-family: var(--font-heading); font-weight: 600; font-size: 1.1rem; cursor: pointer;
}
.amount input:checked + span { background: var(--brand-navy); border-color: var(--brand-navy); color: var(--text-on-dark); }
.amount input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Form fields */
.field { margin-bottom: 1rem; }
.field label, .field .label { display: block; font-weight: 600; margin-bottom: .375rem; }
.field .hint { display: block; font-size: .9rem; color: var(--text-muted); margin: -.125rem 0 .375rem; }
.input, select.input, textarea.input {
  width: 100%; min-height: 3.25rem; padding: .75rem .875rem; font: inherit; color: var(--text);
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-input);
}
textarea.input { min-height: 5.5rem; resize: vertical; }
.input--rupee { display: flex; align-items: center; border: 1.5px solid var(--border); border-radius: var(--radius-input); background: var(--surface); }
.input--rupee span { padding-left: .875rem; font-weight: 600; }
.input--rupee input { border: 0; min-height: 3.125rem; flex: 1; padding: .75rem .5rem; font: inherit; background: transparent; }
.input--rupee:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.input--rupee input:focus-visible { outline: none; }  /* One ring round the ₹ and the field together. */
.input--otp { font-family: var(--font-heading); font-size: 1.6rem; letter-spacing: .6em; text-align: center; }
.field--error .input { border-color: var(--error); }
.field__error { color: var(--error); font-size: .9rem; font-weight: 500; margin-top: .375rem; display: flex; gap: .375rem; }
.field__error::before { content: "!"; display: inline-flex; width: 1.2rem; height: 1.2rem; flex: none; align-items: center; justify-content: center; border-radius: 50%; background: var(--error); color: #fff; font-size: .8rem; font-weight: 700; }
.input-row { display: flex; gap: .5rem; }
.input-row .input:first-child { flex: 0 0 6.5rem; }

/* Tick boxes and choice cards */
.check { display: flex; gap: .75rem; align-items: flex-start; margin-bottom: 1rem; cursor: pointer; }
.check input { width: 1.375rem; height: 1.375rem; margin: .15rem 0 0; flex: none; accent-color: var(--brand-navy); }
.choice { display: block; border: 1.5px solid var(--border-subtle); border-radius: 12px; padding: .875rem 1rem; margin-bottom: .5rem; cursor: pointer; }
.choice input { accent-color: var(--brand-navy); margin-right: .5rem; }
.choice:has(input:checked) { border-color: var(--brand-navy); background: var(--page); }

/* Buttons */
.btn {
  display: flex; align-items: center; justify-content: center; gap: .5rem; width: 100%; min-height: 3.5rem;
  padding: .75rem 1.25rem; border-radius: var(--radius-button); font-family: var(--font-heading);
  font-weight: 700; font-size: 1.05rem; text-decoration: none; cursor: pointer; border: 1.5px solid transparent;
}
.btn--primary { background: var(--brand-yellow); border-color: var(--brand-yellow-border); color: var(--brand-navy); }
.btn--primary:hover { filter: brightness(.96); }
.btn--secondary { background: transparent; border-color: var(--brand-navy); color: var(--brand-navy); }
.btn--quiet { background: transparent; color: var(--logo-blue); min-height: 3rem; font-weight: 600; }
.btn + .btn { margin-top: .625rem; }
.actions { background: var(--surface); padding: .75rem 0 .25rem; margin-top: .5rem; }
/* Long forms only: the main button stays in reach at the bottom of the screen. Short screens keep it
   in place, so it never covers the field being typed in. */
.actions--sticky { position: sticky; bottom: 0; }
/* A focused field always scrolls clear of a pinned button bar. */
html { scroll-padding-bottom: 6.5rem; }

/* Messages */
.notice { border-left: 4px solid var(--brand-gold); background: var(--notice-surface); padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; }
.notice--error { border-left-color: var(--error); background: var(--error-surface); }
.small { font-size: .9rem; color: var(--text-muted); }
.trust { display: flex; gap: .5rem; align-items: center; justify-content: center; font-size: .9rem; color: var(--text-muted); margin-top: .75rem; }

/* Review list */
.summary { margin: 0 0 1rem; }
.summary div { display: flex; justify-content: space-between; gap: 1rem; padding: .625rem 0; border-bottom: 1px solid var(--border-subtle); }
.summary dt { color: var(--text-muted); }
.summary dd { margin: 0; font-weight: 600; text-align: right; }
.summary .total dd { font-family: var(--font-heading); font-size: 1.25rem; }

/* Result screens */
.result { text-align: center; padding: .5rem 0 1rem; }
.result__icon {
  width: 4.5rem; height: 4.5rem; border-radius: 50%; margin: 0 auto 1rem;
  display: flex; align-items: center; justify-content: center; font-size: 2.25rem; font-weight: 700; color: #fff;
}
.result__icon--success { background: var(--success); }
.result__icon--failed { background: var(--error); }
.result__icon--pending { background: var(--brand-gold); color: var(--brand-navy); }

/* Donation list */
.donations { list-style: none; margin: 0; padding: 0; }
.donations li { display: flex; justify-content: space-between; gap: 1rem; padding: .875rem 0; border-bottom: 1px solid var(--border-subtle); }
.donations .amount-value { font-family: var(--font-heading); font-weight: 700; }
.badge { display: inline-block; font-size: .8rem; font-weight: 600; padding: .125rem .5rem; border-radius: 999px; }
.badge--success { background: var(--success-surface); color: var(--success); }
.badge--failed { background: var(--error-surface); color: var(--error); }
.badge--pending { background: var(--notice-surface); color: var(--text); }

/* Information pages */
.prose h2 { font-size: 1.25rem; margin: 1.5rem 0 .5rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.05rem; margin: 1.25rem 0 .375rem; }
.prose ul, .prose ol { padding-left: 1.25rem; margin: 0 0 1rem; }
.prose li { margin-bottom: .375rem; }
.prose a { overflow-wrap: anywhere; }

/* Footer */
.site-footer { max-width: 30rem; margin: 0 auto; padding: 1rem 1rem 2.5rem; font-size: .9rem; color: var(--text-muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: .5rem 0; }
.site-footer a { color: var(--text-muted); }

/* Review bar for mock-ups only: deliberately unlike the design */
.mockbar {
  font: 600 .85rem/1.3 system-ui, sans-serif; background: #FFFBEA; color: #3D3200;
  border-bottom: 2px dashed #B58900; padding: .5rem 1rem; display: flex; gap: .75rem; align-items: center; flex-wrap: wrap;
}
.mockbar a { color: #3D3200; }
.mockbar .spacer { flex: 1; }
