:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #5d697d;
  --line: #d9e1ec;
  --paper: #f7f9fc;
  --panel: #ffffff;
  --blue: #2457d6;
  --green: #18a058;
  --gold: #b5792a;
  --shadow: 0 24px 80px rgba(31, 45, 73, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(23, 32, 51, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(23, 32, 51, 0.05) 1px, transparent 1px),
    var(--paper);
  background-size: 48px 48px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0;
}

.brand,
.top-actions,
.hero-actions,
.drawer-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(36, 87, 214, 0.28);
  border-radius: 8px;
  color: var(--blue);
  background: #fff;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
}

.top-actions {
  gap: 10px;
}

.lang-toggle,
.ghost-link,
.secondary-action,
.primary-action,
.close-button,
.floating-support {
  min-height: 42px;
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
}

.lang-toggle,
.ghost-link,
.secondary-action {
  border: 1px solid var(--line);
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.84);
  text-decoration: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
  gap: 48px;
  width: min(1180px, calc(100% - 40px));
  margin: 34px auto 0;
  align-items: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(2.55rem, 6vw, 5.7rem);
  line-height: 0.96;
}

.hero-text,
.support-section p {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.72;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.primary-action {
  border: 0;
  padding: 12px 18px;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 10px 26px rgba(36, 87, 214, 0.24);
}

.secondary-action {
  color: var(--ink);
}

.license-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.loop-panel {
  position: relative;
  min-height: 410px;
  border: 1px solid rgba(36, 87, 214, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.loop-lines {
  position: absolute;
  inset: 18px;
  width: calc(100% - 36px);
  height: calc(100% - 36px);
  fill: none;
  stroke: rgba(36, 87, 214, 0.2);
  stroke-width: 2;
  stroke-dasharray: 8 10;
  animation: dash 14s linear infinite;
}

.loop-node {
  position: absolute;
  z-index: 1;
  display: grid;
  min-width: 116px;
  min-height: 48px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 760;
  box-shadow: 0 12px 38px rgba(31, 45, 73, 0.09);
}

.loop-node:nth-of-type(1) { left: 8%; top: 12%; }
.loop-node:nth-of-type(2) { right: 12%; top: 15%; }
.loop-node:nth-of-type(3) { left: 38%; top: 34%; }
.loop-node:nth-of-type(4) { left: 10%; bottom: 23%; }
.loop-node:nth-of-type(5) { right: 9%; bottom: 25%; }
.loop-node:nth-of-type(6) { left: 35%; bottom: 8%; }
.loop-node:nth-of-type(7) { right: 34%; top: 6%; }

.loop-node.is-active {
  border-color: rgba(24, 160, 88, 0.4);
  color: var(--green);
}

.value-grid,
.support-section {
  width: min(1180px, calc(100% - 40px));
  margin: 70px auto 0;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.value-grid article,
.support-section,
.drawer-panel,
.lightbox-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 48px rgba(31, 45, 73, 0.08);
}

.value-grid article {
  padding: 22px;
}

.card-kicker {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
}

.value-grid h2 {
  margin: 12px 0 9px;
  font-size: 1.05rem;
}

.value-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
}

.support-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(360px, 1.15fr);
  gap: 28px;
  align-items: center;
  padding: 28px;
  margin-bottom: 96px;
}

.support-section h2 {
  margin-bottom: 12px;
  font-size: clamp(1.65rem, 3vw, 3rem);
  line-height: 1.04;
}

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

.qr-card {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.qr-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}

.qr-card figcaption strong,
.qr-card figcaption span {
  display: block;
}

.qr-card figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.qr-card figcaption strong {
  color: var(--ink);
}

.floating-support {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  display: grid;
  gap: 2px;
  min-width: 112px;
  border: 0;
  padding: 12px 16px;
  color: #fff;
  background: var(--ink);
  box-shadow: var(--shadow);
}

.floating-support span {
  font-size: 0.78rem;
  opacity: 0.82;
}

.support-drawer,
.qr-lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
}

.support-drawer.is-open,
.qr-lightbox.is-open {
  display: block;
}

.drawer-backdrop,
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.48);
}

.drawer-panel {
  position: absolute;
  right: 24px;
  bottom: 24px;
  width: min(520px, calc(100% - 40px));
  padding: 24px;
}

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

.drawer-head h2 {
  margin-bottom: 18px;
}

.close-button {
  align-self: flex-start;
  border: 1px solid var(--line);
  padding: 8px 12px;
  background: #fff;
}

.drawer-qrs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.drawer-qr {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  cursor: zoom-in;
}

.drawer-qr img {
  width: 100%;
}

.drawer-qr span {
  display: block;
  margin-top: 8px;
  font-weight: 700;
}

.drawer-note {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.drawer-links {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.drawer-links a {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  background: #fff;
  text-decoration: none;
}

.lightbox-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(560px, calc(100% - 40px));
  margin: 0;
  padding: 22px;
  transform: translate(-50%, -50%);
  text-align: center;
}

.lightbox-panel img {
  width: 100%;
}

.lightbox-panel figcaption {
  margin-top: 12px;
  font-weight: 800;
}

@keyframes dash {
  to {
    stroke-dashoffset: -180;
  }
}

@media (prefers-reduced-motion: reduce) {
  .loop-lines {
    animation: none;
  }
}

@media (max-width: 920px) {
  .hero,
  .support-section {
    grid-template-columns: 1fr;
  }

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

  .loop-panel {
    min-height: 360px;
  }
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .value-grid,
  .support-section,
  .site-header {
    width: min(100% - 28px, 1180px);
  }

  .value-grid,
  .qr-grid,
  .drawer-qrs {
    grid-template-columns: 1fr;
  }

  .support-section,
  .drawer-panel {
    padding: 18px;
  }

  .drawer-panel {
    left: 14px;
    right: 14px;
    bottom: 14px;
    width: auto;
  }

  .floating-support {
    right: 14px;
    bottom: 14px;
  }
}
