:root {
  color-scheme: light;
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-soft: #eef3f8;
  --ink: #142033;
  --muted: #637083;
  --quiet: #8792a3;
  --line: #dbe3ee;
  --line-strong: #c3cfdd;
  --blue: #2f6fed;
  --green: #18a66a;
  --amber: #f5a524;
  --coral: #ec5b4c;
  --violet: #7457d9;
  --shadow: 0 18px 48px rgba(20, 32, 51, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    linear-gradient(180deg, #f7f9fc 0%, #eef3f8 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Arial, sans-serif;
  line-height: 1.45;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

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

svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  min-height: 72px;
  padding: 0.8rem clamp(1rem, 4vw, 3.5rem);
  border-bottom: 1px solid rgba(219, 227, 238, 0.86);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  color: var(--ink);
  font-weight: 950;
  text-transform: uppercase;
}

.brand img,
.hero-visual img {
  border-radius: 8px;
  image-rendering: pixelated;
  box-shadow: 0 10px 26px rgba(47, 111, 237, 0.18);
}

.brand img {
  width: 40px;
  height: 40px;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 1.8vw, 1.25rem);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 850;
  text-transform: uppercase;
}

.site-nav a {
  padding: 0.5rem 0;
}

.site-nav a:hover,
.site-nav a[aria-current="page"],
.site-footer a:hover {
  color: var(--blue);
}

.ip-button,
.button,
.pay-button,
.mode-tab,
.product-card {
  border-radius: 8px;
}

.ip-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 42px;
  max-width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 0.6rem 0.8rem;
  font-weight: 900;
  cursor: pointer;
}

.ip-button:hover {
  border-color: var(--blue);
  color: var(--blue);
}

main,
.site-footer {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: clamp(1rem, 4vw, 3rem);
  align-items: center;
  min-height: calc(72svh - 72px);
  padding: clamp(2.4rem, 7vw, 5.5rem) 0 clamp(2rem, 5vw, 3.5rem);
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(3rem, 12vw, 7.2rem);
  line-height: 0.9;
  letter-spacing: 0;
  text-transform: uppercase;
}

h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.65rem, 4vw, 2.8rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 0.55rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.lead {
  max-width: 44rem;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.button,
.pay-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  border: 1px solid transparent;
  padding: 0.78rem 1rem;
  font-weight: 950;
  cursor: pointer;
  text-transform: uppercase;
}

.button.primary,
.pay-button {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 12px 28px rgba(47, 111, 237, 0.24);
}

.button.secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.button:hover,
.pay-button:hover {
  transform: translateY(-1px);
}

.hero-visual {
  display: grid;
  gap: 1rem;
  align-content: center;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-visual img {
  width: min(160px, 42vw);
  height: auto;
}

.server-address {
  display: grid;
  gap: 0.25rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.server-address span,
.server-facts dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.server-address strong {
  color: var(--ink);
  font-size: 1.55rem;
}

.server-facts {
  display: grid;
  gap: 0.65rem;
  margin: 0;
}

.server-facts div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--line);
}

.server-facts div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.server-facts dd {
  margin: 0;
  color: var(--ink);
  font-weight: 850;
  text-align: right;
}

.mode-grid,
.quick-links {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

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

.quick-links {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 2rem;
}

.mode-card,
.quick-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(20, 32, 51, 0.07);
}

.mode-card {
  position: relative;
  overflow: hidden;
  padding: 1.25rem;
}

.mode-card::before,
.product-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--accent, var(--blue));
}

.mode-card span {
  display: inline-flex;
  margin-bottom: 1.2rem;
  color: var(--accent, var(--blue));
  font-weight: 950;
}

.mode-card p {
  max-width: 36rem;
  margin: 0.75rem 0 1rem;
  color: var(--muted);
}

.mode-card a {
  color: var(--blue);
  font-weight: 950;
}

.accent-blue {
  --accent: var(--blue);
}

.accent-green {
  --accent: var(--green);
}

.quick-card {
  display: grid;
  gap: 0.4rem;
  min-height: 150px;
  padding: 1rem;
}

.quick-card svg {
  color: var(--blue);
}

.quick-card strong {
  align-self: end;
  font-size: 1.06rem;
}

.quick-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.donate-page {
  padding: clamp(1.6rem, 4vw, 3rem) 0 2rem;
}

.donate-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.donate-heading h1 {
  font-size: clamp(2.8rem, 9vw, 6rem);
}

.donate-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
  gap: 1rem;
  align-items: start;
}

.catalog,
.checkout {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.catalog {
  min-width: 0;
  padding: 1rem;
}

.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 42px;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.copy-status {
  min-height: 1.2rem;
  color: var(--green);
  font-size: 0.9rem;
}

.mode-tabs {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.mode-tab {
  min-height: 36px;
  border: 0;
  padding: 0.48rem 0.85rem;
  background: var(--blue);
  color: #fff;
  font-weight: 950;
  cursor: pointer;
  text-transform: uppercase;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.product-card {
  position: relative;
  display: grid;
  min-height: 176px;
  padding: 0.95rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(20, 32, 51, 0.06);
}

.product-card:hover,
.product-card.is-active {
  border-color: var(--accent, var(--blue));
  box-shadow: 0 14px 34px rgba(20, 32, 51, 0.12);
}

.product-card.is-active {
  background: #f4f8ff;
}

.product-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.product-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.3rem 0.55rem;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--accent, var(--blue));
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
}

.product-title {
  display: block;
  margin: 0.9rem 0 0;
  font-size: 1.2rem;
  font-weight: 950;
}

.product-meta,
.product-preview {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.product-price {
  align-self: end;
  margin-top: 1.1rem;
  color: var(--ink);
  font-size: 1.5rem;
  font-weight: 950;
}

.checkout {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.selected-head {
  display: grid;
  gap: 0.45rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.selected-kicker {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.selected-price {
  color: var(--blue);
  font-size: 2rem;
  line-height: 1;
}

.payment-form {
  display: grid;
  gap: 0.65rem;
}

.payment-form label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.payment-form input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0.75rem 0.85rem;
  outline: none;
}

.payment-form input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(47, 111, 237, 0.12);
}

.pay-button {
  min-height: 50px;
}

.pay-button:disabled {
  background: #a8b2c0;
  box-shadow: none;
  cursor: not-allowed;
}

.payment-note {
  min-height: 1.3rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.payment-note.is-warning {
  color: var(--coral);
}

.selected-lists {
  display: grid;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.selected-lists ul {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.selected-lists li {
  display: flex;
  gap: 0.48rem;
  min-width: 0;
  color: var(--ink);
  font-size: 0.93rem;
}

.selected-lists li::before {
  content: "";
  flex: 0 0 auto;
  width: 0.45rem;
  height: 0.45rem;
  margin-top: 0.5rem;
  border-radius: 999px;
  background: var(--green);
}

.loading,
.empty {
  grid-column: 1 / -1;
  min-height: 240px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-soft);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.2rem;
  padding: 1.4rem 0 2rem;
  color: var(--muted);
  font-size: 0.86rem;
}

@media (max-width: 1040px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .site-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .home-hero,
  .donate-layout {
    grid-template-columns: 1fr;
  }

  .checkout {
    position: static;
  }

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

@media (max-width: 760px) {
  .site-header {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .brand,
  .ip-button,
  .site-nav {
    justify-self: stretch;
  }

  .site-nav {
    justify-content: space-between;
    padding-bottom: 0.1rem;
  }

  .home-hero {
    min-height: auto;
  }

  .mode-grid,
  .quick-links,
  .product-grid {
    grid-template-columns: 1fr;
  }

  .donate-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .mode-tabs,
  .mode-tab {
    width: 100%;
  }
}

@media (min-width: 761px) and (max-width: 1180px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
