:root {
  --ink: #f3f7ff;
  --muted: #93a3bc;
  --dim: #6d7d96;
  --bg: #070b14;
  --line: #1b2a44;
  --line-soft: #16233a;
  --accent: #3d82f6;
}

* {
  box-sizing: border-box;
  border-color: var(--line-soft);
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 520px at 78% -8%, rgba(61, 130, 246, 0.14), transparent 62%),
    radial-gradient(700px 420px at 8% 34%, rgba(61, 130, 246, 0.06), transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: rgba(61, 130, 246, 0.35);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.shell {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

h1,
h2,
h3,
p {
  margin: 0;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow::before {
  content: "";
  width: 1.6rem;
  height: 1px;
  background: currentColor;
  opacity: 0.75;
}

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(22, 35, 58, 0.8);
  background: rgba(7, 11, 20, 0.85);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.nav {
  display: none;
  gap: 2rem;
}

.nav a {
  color: #b7c3d6;
  font-size: 0.8125rem;
  text-decoration: none;
  transition: color 0.18s ease;
}

.nav a:hover {
  color: #fff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.875rem;
  padding-inline: 1.35rem;
  border: 0;
  border-radius: 0.375rem;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    opacity 0.18s ease;
}

.btn-primary {
  background: var(--accent);
  color: #f7fbff;
  box-shadow: 0 10px 26px -14px rgba(61, 130, 246, 0.9);
}

.btn-primary:hover:not(:disabled) {
  background: #2f74ea;
}

.btn-ghost {
  border: 1px solid var(--line);
  background: transparent;
  color: #e7eefb;
}

.btn-ghost:hover:not(:disabled) {
  border-color: #33506f;
  background: rgba(61, 130, 246, 0.07);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.header-cta {
  display: none;
}

.hero {
  display: grid;
  gap: 2rem;
  padding-block: 3rem 2.5rem;
  align-items: center;
}

.hero h1 {
  margin-top: 1.75rem;
  font-size: clamp(3rem, 7.8vw, 6.3rem);
  line-height: 0.94;
  letter-spacing: -0.05em;
  font-weight: 700;
}

.lead {
  margin-top: 1.75rem;
  max-width: 30rem;
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--muted);
}

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

.stage {
  position: relative;
  height: 17rem;
  perspective: 1400px;
  transform: scale(0.64);
  transform-origin: left top;
}

.ticket {
  position: absolute;
  width: 16rem;
  height: 18.5rem;
  border: 1px solid rgba(96, 156, 255, 0.45);
  border-radius: 0.5rem;
  background: linear-gradient(158deg, rgba(38, 68, 116, 0.95), rgba(16, 30, 52, 0.98) 58%, rgba(12, 22, 39, 0.98));
  box-shadow: 0 30px 54px -28px rgba(0, 0, 0, 0.95);
  transform-origin: 50% 85%;
}

.ticket::before {
  content: "";
  position: absolute;
  inset: 1.3rem;
  background-image:
    linear-gradient(rgba(150, 192, 255, 0.32), rgba(150, 192, 255, 0.32)),
    linear-gradient(rgba(150, 192, 255, 0.32), rgba(150, 192, 255, 0.32)),
    linear-gradient(rgba(150, 192, 255, 0.19), rgba(150, 192, 255, 0.19)),
    repeating-linear-gradient(90deg, rgba(150, 192, 255, 0.32) 0 4px, transparent 4px 8px),
    linear-gradient(rgba(150, 192, 255, 0.16), rgba(150, 192, 255, 0.16)),
    linear-gradient(rgba(150, 192, 255, 0.11), rgba(150, 192, 255, 0.11)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 48 48' fill='none' stroke='%239cc6ff' stroke-width='1.6'%3E%3Crect x='9' y='14' width='24' height='19' rx='2.5'/%3E%3Ccircle cx='17' cy='23' r='2.4'/%3E%3Cpath d='M9 20h24M9 26.5h24' stroke-dasharray='3 3' stroke-width='1.2'/%3E%3Cpath d='M31 12.5 39 8v9l-8 4.5v-9Z' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position:
    0 0.5rem,
    0 1.2rem,
    0 2.5rem,
    0 9.1rem,
    0 9.8rem,
    0 10.6rem,
    right 0 top 3.9rem;
  background-size:
    8.4rem 0.3rem,
    5.6rem 0.3rem,
    7.2rem 0.3rem,
    100% 1px,
    6.4rem 0.3rem,
    4.2rem 0.3rem,
    40px 40px;
}

.ticket::after {
  content: "GAS / REFUND";
  position: absolute;
  left: 1.3rem;
  bottom: 1.35rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: #7fb2ff;
}

.ticket--a {
  left: 2.6rem;
  top: 5.4rem;
  transform: rotate(-24deg) rotateX(7deg);
  opacity: 0.45;
}

.ticket--b {
  left: 6rem;
  top: 3rem;
  transform: rotate(-15deg) rotateX(5deg);
  opacity: 0.7;
}

.ticket--c {
  left: 9.4rem;
  top: 0.6rem;
  transform: rotate(-6deg);
}

.plus {
  position: absolute;
  left: 25.75rem;
  top: 8.6rem;
  color: #5f9bff;
  opacity: 0.85;
}

.section {
  padding-block: 4rem;
}

.section h2 {
  margin-top: 1.25rem;
  max-width: 44rem;
  font-size: clamp(2.1rem, 4.2vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.section > .lead {
  max-width: 38rem;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.two-col {
  display: grid;
  gap: 1rem;
  margin-top: 2.25rem;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: linear-gradient(180deg, rgba(19, 31, 50, 0.92), rgba(11, 19, 33, 0.92));
  padding: 1.6rem;
}

.card-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--accent);
}

.panel h3 {
  margin-top: 0.75rem;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.muted {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.7;
}

.panel .muted {
  margin-top: 0.65rem;
}

.scan-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.field {
  width: 100%;
  height: 2.875rem;
  padding-inline: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.375rem;
  background: #080f1b;
  color: var(--ink);
  font: inherit;
  font-size: 0.875rem;
  transition: border-color 0.18s ease;
}

.field::placeholder {
  color: #56657d;
}

.field:focus {
  border-color: #35619c;
  outline: none;
}

.field[data-invalid="true"] {
  border-color: #b3453c;
}

.scan-btn {
  width: 100%;
}

.connect-btn {
  margin-top: 1.25rem;
}

.error {
  margin-top: 1rem;
  font-size: 0.82rem;
  color: #e08b83;
}

.loading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 1.5rem;
}

.small {
  font-size: 0.82rem;
}

.dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.25;
  }
}

.result {
  margin-top: 1rem;
  padding: 1.6rem;
  animation: rise 0.5s ease both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.status-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.status-line .dot {
  width: 0.375rem;
  height: 0.375rem;
  animation: none;
}

.result h3 {
  margin-top: 0.75rem;
  font-size: 1.9rem;
  letter-spacing: -0.03em;
}

.result > .muted {
  margin-top: 0.65rem;
  font-size: 0.88rem;
}

.result strong {
  color: var(--ink);
  font-weight: 600;
}

.result-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1.25rem 2.5rem;
  margin-top: 1.75rem;
}

.count-block {
  min-width: 7rem;
}

.count {
  font-size: 2.9rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.count-label {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.refund {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.25rem;
  border: 1px solid #2b4a76;
  border-radius: 0.375rem;
  background: linear-gradient(140deg, rgba(38, 68, 116, 0.55), rgba(11, 19, 33, 0.9));
}

.refund-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--dim);
}

.refund-value {
  margin-top: 0.25rem;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.refund-value .unit {
  font-size: 0.9rem;
  font-weight: 600;
}

.fees-line {
  margin-top: 1.25rem;
  font-size: 0.75rem;
  color: var(--dim);
}

.fees-line span.muted {
  color: var(--muted);
}

.claim-copy {
  margin-top: 1.75rem;
}

.claim-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.address-chip {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.no-claim {
  margin-top: 1.5rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line-soft);
  border-radius: 0.375rem;
  background: #070f1b;
  color: #a3b4cc;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
}

.chip::before {
  content: "";
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: #39a06b;
}

#empty-chip::before {
  background: var(--dim);
}

.copy {
  height: 2rem;
  padding-inline: 0.6rem;
  border: 1px solid var(--line-soft);
  border-radius: 0.375rem;
  background: transparent;
  color: var(--dim);
  font: inherit;
  font-size: 0.7rem;
  cursor: pointer;
  transition:
    color 0.18s ease,
    border-color 0.18s ease;
}

.copy:hover {
  color: var(--ink);
  border-color: #33506f;
}

.notice {
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: #8fb6f5;
}

.steps {
  display: grid;
  gap: 1rem;
  margin-top: 2.25rem;
}

.step {
  padding: 1.6rem 1.6rem 2.6rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: linear-gradient(180deg, rgba(15, 25, 41, 0.85), rgba(10, 17, 29, 0.85));
}

.step-index {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.17em;
  color: var(--accent);
}

.step h3 {
  margin-top: 0.75rem;
  font-size: 1.15rem;
  letter-spacing: -0.015em;
}

.step .muted {
  margin-top: 0.65rem;
}

.faq {
  margin-top: 2rem;
}

.faq-item {
  border-bottom: 1px solid var(--line-soft);
}

.faq-q {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.8rem;
  padding: 1.35rem 0;
  border: 0;
  background: none;
  color: #e8eefb;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.faq-q::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 8px solid var(--accent);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  transition: transform 0.2s ease;
}

.faq-q[aria-expanded="true"]::before {
  transform: rotate(90deg);
}

.faq-a {
  padding: 0 0 1.5rem 1.55rem;
  max-width: 74ch;
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--muted);
}

.footer {
  border-top: 1px solid var(--line-soft);
  padding-block: 1.75rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.72rem;
  color: var(--dim);
}

@media (min-width: 640px) {
  .header-cta {
    display: inline-flex;
  }

  .scan-form {
    flex-direction: row;
  }

  .scan-btn {
    width: 6.4rem;
  }

  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 768px) {
  .nav {
    display: flex;
  }

  .two-col {
    grid-template-columns: 1fr 1fr;
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .result {
    padding: 2rem;
  }
}

@media (min-width: 1024px) {
  .hero {
    grid-template-columns: 1.02fr 0.98fr;
    gap: 1rem;
    padding-block: 4rem 3.5rem;
  }

  .stage {
    height: 24.5rem;
    transform: none;
  }
}
