:root {
  --bg-black: #060606;
  --bg-black-soft: #101010;
  --copper-1: #b58d64;
  --copper-2: #8d6947;
  --copper-3: #5f432a;
  --copper-4: #3f2d1d;
  --sand: #e6d7c6;
  --sand-dim: #bfae9a;
  --card-dark: #111111;
  --card-dark-border: rgba(181, 141, 100, 0.35);
  --shadow-xl: 0 22px 60px rgba(0, 0, 0, 0.5);
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Inter, sans-serif;
  color: var(--sand);
  background:
    radial-gradient(1200px 700px at 10% 5%, rgba(181, 141, 100, 0.2), transparent 55%),
    radial-gradient(1200px 700px at 90% 95%, rgba(95, 67, 42, 0.35), transparent 55%),
    linear-gradient(125deg, #040404 0%, #0a0a0a 40%, #0d0d0d 70%, #080808 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 3px 3px;
  opacity: 0.2;
  z-index: 0;
}

.layout {
  position: relative;
  z-index: 1;
  width: min(760px, 100% - 2rem);
  margin: 1.25rem auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
  align-items: start;
}

.brand-side,
.donation-side {
  min-width: 0;
  width: 100%;
}

.brand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

img {
  max-width: 100%;
  height: auto;
}

.brand-logo-horizontal {
  width: min(540px, 100%);
  height: auto;
  filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.5));
}

.lang-wrap {
  align-self: flex-end;
}

.lang-trigger {
  border: 1px solid rgba(181, 141, 100, 0.45);
  color: var(--sand);
  background: rgba(11, 11, 11, 0.75);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: 160ms ease;
}

.lang-trigger:hover {
  border-color: rgba(181, 141, 100, 0.8);
  background: rgba(22, 22, 22, 0.92);
}

#langChevron {
  transition: transform 180ms ease;
}

#langChevron.rotate {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  border: 1px solid rgba(181, 141, 100, 0.5);
  background: rgba(15, 15, 15, 0.97);
  backdrop-filter: blur(5px);
  border-radius: 12px;
  overflow: hidden;
  min-width: 126px;
  box-shadow: var(--shadow-xl);
}

.lang-option {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(181, 141, 100, 0.2);
  background: transparent;
  color: var(--sand);
  font: inherit;
  text-align: left;
  padding: 0.58rem 0.75rem;
  cursor: pointer;
}

.lang-option:last-child {
  border-bottom: 0;
}

.lang-option:hover,
.lang-option.active {
  background: linear-gradient(90deg, rgba(181, 141, 100, 0.22), rgba(143, 105, 71, 0.22));
}

.brand-card {
  border: 1px solid var(--card-dark-border);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(155deg, rgba(16, 16, 16, 0.92) 0%, rgba(8, 8, 8, 0.94) 100%);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.brand-avatar {
  display: block;
  width: 100%;
  height: auto;
}

.brand-copy {
  padding: 1.25rem 1.35rem 1.45rem;
  color: var(--sand-dim);
}

.brand-copy h2 {
  margin: 0 0 0.55rem;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  color: var(--sand);
}

.brand-copy p {
  margin: 0 0 0.7rem;
  line-height: 1.55;
}

#storyLead {
  color: var(--sand);
  font-family: "Playfair Display", serif;
  font-style: italic;
}

#missionTitle {
  color: var(--sand);
}

.brand-footer {
  margin: 0.7rem 0 0;
  text-align: center;
  color: rgba(230, 215, 198, 0.72);
  font-size: 0.86rem;
  letter-spacing: 0.06em;
}

.donation-card {
  border: 1px solid rgba(181, 141, 100, 0.45);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background:
    linear-gradient(155deg, rgba(20, 20, 20, 0.95) 0%, rgba(10, 10, 10, 0.98) 36%, rgba(18, 12, 8, 0.98) 100%);
  box-shadow: var(--shadow-xl);
}

.donation-top {
  padding: 1rem 1.1rem;
  border-bottom: 1px solid rgba(181, 141, 100, 0.3);
  background: linear-gradient(90deg, rgba(181, 141, 100, 0.15), rgba(62, 43, 28, 0.3));
}

.donation-logo {
  display: block;
  width: min(200px, 42vw);
  height: auto;
  margin: 0 auto;
}

.donation-content {
  padding: 1.05rem;
  display: flex;
  flex-direction: column;
}

.section-head h1 {
  margin: 0;
  color: var(--sand);
  font-family: "Playfair Display", serif;
  font-size: clamp(1.28rem, 2.7vw, 1.9rem);
}

.section-head p {
  margin: 0.34rem 0 0;
  color: var(--sand-dim);
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.62rem;
  margin-top: 0.9rem;
}

.amount-btn,
.other-btn,
.checkout-btn {
  border: 1px solid rgba(181, 141, 100, 0.5);
  border-radius: var(--radius-md);
  font: inherit;
  color: var(--sand);
  background: rgba(11, 11, 11, 0.76);
  cursor: pointer;
  transition: 160ms ease;
}

.amount-btn {
  position: relative;
  min-height: 3.05rem;
  font-size: 1.08rem;
  font-weight: 700;
}

.amount-btn:hover,
.other-btn:hover {
  border-color: rgba(181, 141, 100, 0.8);
  background: rgba(24, 24, 24, 0.95);
}

.amount-btn.active {
  background: linear-gradient(135deg, var(--copper-1), var(--copper-3));
  color: #0d0d0d;
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(95, 67, 42, 0.35);
}

#popularBadge {
  position: absolute;
  top: 0.34rem;
  right: 0.42rem;
  font-size: 0.63rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff7ec;
  opacity: 0.95;
}

.other-btn {
  width: 100%;
  margin-top: 0.62rem;
  min-height: 2.8rem;
  border-style: dashed;
  font-weight: 600;
}

.custom-row {
  margin-top: 0.62rem;
  display: flex;
  align-items: center;
  gap: 0.56rem;
  border: 1px solid rgba(181, 141, 100, 0.55);
  border-radius: var(--radius-md);
  background: rgba(14, 14, 14, 0.92);
  padding: 0.55rem 0.75rem;
}

.custom-prefix {
  font-weight: 700;
  color: var(--copper-1);
}

.custom-row input {
  width: 100%;
  border: 0;
  outline: 0;
  font: inherit;
  color: var(--sand);
  background: transparent;
  font-size: 1.06rem;
}

.custom-row input::placeholder {
  color: rgba(230, 215, 198, 0.45);
}

.stats-row {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.56rem;
}

.stat-item {
  border: 1px solid rgba(181, 141, 100, 0.4);
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, rgba(14, 14, 14, 0.95), rgba(20, 14, 10, 0.9));
  padding: 0.65rem;
  display: grid;
  gap: 0.25rem;
}

.stat-item span {
  font-size: 0.78rem;
  color: var(--sand-dim);
}

.stat-item strong {
  color: var(--sand);
  font-size: 1.05rem;
}

.name-field {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.34rem;
}

.name-field label {
  font-size: 0.88rem;
}

.name-field input {
  width: 100%;
  min-height: 2.7rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(181, 141, 100, 0.45);
  background: rgba(12, 12, 12, 0.83);
  color: var(--sand);
  padding: 0.55rem 0.75rem;
  font: inherit;
  outline: 0;
}

.name-field input:focus {
  border-color: rgba(181, 141, 100, 0.9);
  box-shadow: 0 0 0 2px rgba(181, 141, 100, 0.16);
}

.checkout-btn {
  margin-top: 0.85rem;
  width: 100%;
  min-height: 3rem;
  font-size: 1.02rem;
  font-weight: 700;
  border: 0;
  color: #090909;
  background: linear-gradient(120deg, var(--copper-1) 0%, #9f7751 45%, var(--copper-3) 100%);
}

.checkout-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.checkout-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

.thanks-copy {
  margin: 0.65rem 0 0;
  text-align: center;
  color: var(--sand-dim);
  font-family: "Playfair Display", serif;
  font-style: italic;
}

.supporters {
  margin-top: 0.95rem;
  border-top: 1px solid rgba(181, 141, 100, 0.25);
  padding-top: 0.82rem;
}

.supporters h3 {
  margin: 0 0 0.52rem;
  font-family: "Playfair Display", serif;
  font-size: 1.08rem;
}

.top-empty {
  margin: 0;
  border: 1px dashed rgba(181, 141, 100, 0.42);
  border-radius: var(--radius-md);
  color: var(--sand-dim);
  background: rgba(13, 13, 13, 0.72);
  padding: 0.72rem;
}

.top-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.top-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-radius: 11px;
  border: 1px solid rgba(181, 141, 100, 0.35);
  background: rgba(11, 11, 11, 0.78);
  padding: 0.55rem 0.65rem;
}

.top-list .name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-list .sum {
  color: var(--copper-1);
  font-weight: 700;
  white-space: nowrap;
}

.hidden {
  display: none !important;
}

@media (max-width: 1080px) {
  .brand-header {
    margin-bottom: 0.7rem;
  }

  .brand-logo-horizontal {
    width: min(420px, 100%);
  }
}

@media (max-width: 640px) {
  .layout {
    width: calc(100% - 1rem);
    margin: 0.7rem auto;
    gap: 0.75rem;
  }

  .brand-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
  }

  .lang-wrap {
    align-self: flex-end;
  }

  .brand-copy {
    padding: 1rem;
  }

  .donation-content {
    padding: 0.8rem;
  }

  .amount-btn {
    min-height: 2.75rem;
    font-size: 1rem;
  }

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