/* =========================================================
   Cards / pricing page — loaded after styles.css
   ========================================================= */

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* tone per finish: check marks, swatches, accents */
.t-black    { --tone: #9aa3b8; --swatch: linear-gradient(135deg, #4a4e57, #0d0e11); }
.t-silver   { --tone: #dfe3e8; --swatch: linear-gradient(135deg, #f4f5f7, #9ea3a8); }
.t-gold     { --tone: #e6c677; --swatch: linear-gradient(135deg, #fbeebc, #a8812f); }
.t-rosegold { --tone: #f1b6a5; --swatch: linear-gradient(135deg, #fbe0d7, #b27565); }

/* ---------- hero + tiers ---------- */
.pricing {
  position: relative;
  padding: 130px var(--pad-x) 110px;
  color: var(--white);
  background: linear-gradient(180deg, #00001e 0%, #010124 16%, #020e3a 42%, #0c2e63 78%, #173f78 100%);
  overflow: hidden;
}
.pricing::before {
  content: "";
  position: absolute;
  left: 50%; top: -220px;
  width: 1100px; height: 700px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(90, 140, 255, 0.28), transparent 70%);
  pointer-events: none;
}
.pricing__head { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.pricing__head .h1 { margin-top: 26px; }
.pricing__head .lead { max-width: 560px; margin-top: 18px; opacity: 0.86; }

.billing {
  display: inline-flex;
  gap: 4px;
  margin-top: 34px;
  padding: 4px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 1px;
}
.billing__opt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.72);
  border-radius: 1px;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}
.billing__opt:hover { color: var(--white); }
.billing__opt.is-active { background: var(--paper); color: var(--ink); }
.billing__save {
  padding: 2px 6px;
  font-size: 11px;
  background: var(--accent);
  color: var(--white);
  border-radius: 1px;
}

.tiers {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: var(--max);
  margin: 70px auto 0;
  align-items: stretch;
}
.tier {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px 20px 26px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.tier:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.18); }
.tier--featured {
  border-color: rgba(230, 198, 119, 0.55);
  background: linear-gradient(180deg, rgba(230, 198, 119, 0.14), rgba(255, 255, 255, 0.05) 45%);
}
.tier--featured:hover { border-color: rgba(230, 198, 119, 0.85); }
.tier__badge {
  position: absolute;
  top: -1px; right: -1px;
  padding: 6px 10px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: -0.02em;
  background: var(--accent);
  color: var(--white);
  border-radius: 0 2px 0 2px;
}
.tier__badge--rose { background: var(--tone); color: #3b1d17; }

/* card image with tilt + glare */
.tier__card { perspective: 900px; margin: 18px 0 26px; }
.tier__card-inner {
  position: relative;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.6s var(--ease);
  animation: floaty 6s ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
}
.tier:hover .tier__card-inner { transition-duration: 0.15s; }
.tier__card img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 25, 0.5));
}
.tier__glare {
  position: absolute;
  inset: 0;
  border-radius: 3.4% / 5.4%;
  background: radial-gradient(circle at var(--gx, 30%) var(--gy, 0%), rgba(255, 255, 255, 0.38), transparent 50%);
  mix-blend-mode: soft-light;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.tier:hover .tier__glare { opacity: 1; }

.tier__name { display: flex; align-items: center; gap: 10px; }
.tier__name h3 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 28px;
  letter-spacing: -0.045em;
  line-height: 1.1;
}
.swatch { width: 12px; height: 12px; border-radius: 50%; background: var(--swatch); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25); flex: none; }
.tier__kind { margin-top: 6px; font-size: 12px; opacity: 0.55; }

.tier__price { display: flex; align-items: baseline; gap: 2px; margin-top: 22px; font-family: var(--f-display); line-height: 1; }
.tier__price .cur { font-size: 22px; opacity: 0.7; align-self: flex-start; margin-top: 6px; }
.tier__price .amt { display: inline-block; font-size: 50px; font-weight: 500; letter-spacing: -0.05em; }
.tier__price .per { font-size: 15px; opacity: 0.6; margin-left: 4px; letter-spacing: -0.02em; }
.tier__bill { margin-top: 10px; font-size: 11px; opacity: 0.55; min-height: 14px; }
.is-flipping { animation: flipIn 0.55s var(--ease); }
@keyframes flipIn {
  from { opacity: 0; transform: translateY(35%); filter: blur(4px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}

.tier__cta { justify-content: center; width: 100%; margin-top: 22px; }
.tier__plus { margin-top: 26px; font-size: 13px; letter-spacing: -0.02em; opacity: 0.6; }
.tier__list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 11px; }
.tier__list li { display: flex; gap: 10px; font-size: 14px; line-height: 1.35; letter-spacing: -0.02em; opacity: 0.92; }
.tier__list li::before {
  content: "";
  flex: none;
  width: 14px; height: 14px;
  margin-top: 2px;
  background: var(--tone);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pricing__note { position: relative; margin-top: 40px; text-align: center; font-size: 12px; opacity: 0.6; }

/* ---------- how it works ---------- */
.how { background: var(--white); padding-bottom: 120px; }
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: var(--max);
  margin: 70px auto 0;
  padding: 0;
}
.step {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 280px;
  padding: 24px;
  background: var(--paper);
  border-radius: 2px;
}
.step__n { color: var(--red); }
.step__icon { width: 46px; height: 46px; margin-top: auto; color: var(--ink); }
.step__t {
  margin-top: 22px;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.045em;
  line-height: 1.1;
}
.step__d { margin-top: 10px; font-size: 15px; line-height: 1.4; letter-spacing: -0.02em; opacity: 0.75; max-width: 340px; }

/* ---------- comparison table ---------- */
.compare { background: var(--paper-2); }
.compare__wrap {
  max-width: var(--max);
  margin: 70px auto 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.ctable { width: 100%; min-width: 760px; border-collapse: collapse; }
.ctable th, .ctable td {
  padding: 18px 16px;
  text-align: left;
  border-top: 1px solid var(--line-light);
  font-size: 15px;
  letter-spacing: -0.02em;
  vertical-align: middle;
}
.ctable thead th { border-top: 0; padding-top: 0; font-weight: 400; vertical-align: bottom; }
.ctable thead img { width: 86px; height: auto; margin-bottom: 12px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.18)); }
.ctable thead .mono { font-size: 12px; }
.ctable tbody th { font-weight: 400; opacity: 0.7; width: 28%; }
.ctable .col-feat { background: rgba(230, 198, 119, 0.14); }
.ctable .yes::before {
  content: "";
  display: inline-block;
  width: 16px; height: 16px;
  vertical-align: -3px;
  background: var(--ink);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ctable .no { opacity: 0.3; }

/* ---------- apply section ---------- */
.apply__form { display: flex; flex-direction: column; align-items: center; margin-top: 30px; }
.apply__submit { width: 500px; max-width: 100%; margin-top: 10px; }
.finish-pick { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; border: 0; }
.finish-pick label { cursor: pointer; }
.finish-pick input { position: absolute; opacity: 0; pointer-events: none; }
.finish-pick span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 1px;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.finish-pick span:hover { background: rgba(255, 255, 255, 0.2); }
.finish-pick input:checked + span { background: var(--paper); color: var(--ink); }
.finish-pick input:focus-visible + span { outline: 2px solid var(--white); outline-offset: 2px; }

/* wallet the card will spend from */
.wallet-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 500px;
  max-width: 100%;
  height: 54px;
  margin-top: 18px;
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: -0.02em;
  color: var(--white);
  background: rgba(171, 159, 242, 0.22);
  border: 1px solid rgba(171, 159, 242, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 1px;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.wallet-link:hover { background: rgba(171, 159, 242, 0.34); }
.wallet-link.is-connected { background: rgba(61, 220, 132, 0.16); border-color: rgba(61, 220, 132, 0.7); }
.wallet-link.is-connected:hover { background: rgba(61, 220, 132, 0.26); }
.wallet-link.is-connected .wallet-btn__icon::after { transform: scale(1); }
.wallet-link.is-busy { opacity: 0.7; pointer-events: none; }
.wallet-link.is-error { border-color: #ff8f80; animation: nudge 0.45s var(--ease); }
@keyframes nudge {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* ---------- responsive ---------- */
@media (max-width: 1199px) {
  .tiers { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .pricing { padding: 110px 16px 80px; }
  .billing__opt { padding: 0 12px; font-size: 12px; }
  .tiers { grid-template-columns: 1fr; margin-top: 44px; }
  .tier__card { margin: 12px 0 20px; }
  .steps { grid-template-columns: 1fr; margin-top: 44px; }
  .step { min-height: 220px; }
  .wallet-link, .apply__submit { max-width: 360px; }
  .compare__wrap { margin-top: 44px; }
  .ctable { min-width: 640px; }
  .ctable th, .ctable td { padding: 14px 12px; font-size: 14px; }
  .ctable thead img { width: 64px; }
}
