/* Pearl Pay — money/commerce identity on the Pearl brand foundation.
 * Same tokens, sticky blurred nav and footer conventions as the main site;
 * mint-led accents, asymmetric hero, and payment motifs make it unmistakably
 * the payments product. */

:root {
  --bg: #06090f;
  --bg-alt: #0a0f18;
  --card: #0d1420;
  --card-border: rgba(148, 197, 255, 0.12);
  --text: #e8eef7;
  --muted: #93a1b8;
  --accent: #6fd3ff;
  --accent-2: #c9a7ff;
  --accent-3: #7dffd4;
  --good: #7dffd4;
  --warn: #fcd34d;
  --bad: #fca5a5;
  --gradient: linear-gradient(120deg, #6fd3ff, #c9a7ff 55%, #7dffd4);
  /* Pay leads with mint: the money/commerce signature */
  --pay: #7dffd4;
  --pay-gradient: linear-gradient(120deg, #7dffd4, #6fd3ff 55%, #c9a7ff);
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }
.container.narrow { max-width: 760px; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.75rem; }
h1 { font-size: clamp(2.4rem, 5.4vw, 3.9rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; }

a { color: var(--accent); }
p { margin: 0 0 1rem; }
code { font-family: var(--mono); font-size: 0.88em; background: rgba(125, 255, 212, 0.08); padding: 0.15em 0.4em; border-radius: 6px; }

.mono { font-family: var(--mono); }
.hidden { display: none !important; }

/* Eyebrow labels lead with mint — the Pay signature */
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--pay);
  margin-bottom: 0.75rem;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* Mint-led gradient for Pay headlines */
.gradient-text-pay {
  background: var(--pay-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 40rem; }

/* Buttons — primary leads with the mint gradient */
.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-weight: 650;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
  font-size: 1rem;
}
button.btn { font-family: var(--font); }
.btn-primary {
  background: var(--pay-gradient);
  color: #04121a;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(125, 255, 212, 0.35); }
.btn-ghost {
  border-color: var(--card-border);
  color: var(--text);
  background: rgba(13, 20, 32, 0.6);
}
.btn-ghost:hover { border-color: var(--pay); }
.btn-small { padding: 0.45rem 1rem; font-size: 0.85rem; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

/* Nav — shared sticky blurred convention */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(6, 9, 15, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
}
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}
.brand-mark { font-size: 1.5rem; }
.nav-links { display: flex; gap: 1.25rem; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 550; }
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--pay); }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--card-border);
  color: var(--text);
  border-radius: 8px;
  padding: 0.35rem 0.7rem;
  font-size: 1.1rem;
  cursor: pointer;
}
.conn {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  background: rgba(13, 20, 32, 0.6);
}
.conn::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bad);
  margin-right: 0.45rem;
  vertical-align: 1px;
}
.conn.ok { color: var(--text); }
.conn.ok::before { background: var(--pay); box-shadow: 0 0 8px rgba(125, 255, 212, 0.8); }

/* Hero — asymmetric: copy left, live invoice preview right */
.hero { position: relative; padding: 4.5rem 0 4rem; overflow: hidden; }
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(640px 340px at 12% 8%, rgba(125, 255, 212, 0.13), transparent 60%),
    radial-gradient(700px 380px at 88% 22%, rgba(111, 211, 255, 0.12), transparent 60%),
    radial-gradient(520px 300px at 55% 100%, rgba(201, 167, 255, 0.08), transparent 60%);
  pointer-events: none;
}
.hero-inner { position: relative; }
.hero-pay {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3.5rem;
  align-items: center;
}
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1.75rem 0 0; }

/* Live invoice preview card — the Pay motif */
.invoice-preview {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(125, 255, 212, 0.06), 0 0 48px rgba(125, 255, 212, 0.07);
  position: relative;
  overflow: hidden;
}
.invoice-preview::before {
  content: "";
  position: absolute;
  top: 0; left: 1.5rem; right: 1.5rem;
  height: 2px;
  background: var(--pay-gradient);
  border-radius: 2px;
  opacity: 0.8;
}
.ip-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.ip-label { font-size: 0.95rem; font-weight: 700; }
.ip-amount { font-size: 2rem; font-weight: 800; margin: 0.25rem 0; }
.ip-usd { color: var(--muted); font-size: 0.9rem; margin-bottom: 1rem; }
.ip-qr {
  background: #fff;
  border-radius: 12px;
  padding: 0.7rem;
  width: 168px;
  height: 168px;
  margin: 0 auto 1rem;
  box-shadow: 0 0 32px rgba(125, 255, 212, 0.18);
}
.ip-addr {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  word-break: break-all;
  text-align: center;
  margin-bottom: 1rem;
}
/* Animated status pill: cycles awaiting → detected → confirmed (pure CSS) */
.ip-status {
  display: inline-block;
  padding: 0.35rem 0.95rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.82rem;
  border: 1px solid;
  animation: ip-cycle 9s ease-in-out infinite;
}
.ip-status::after { content: "Awaiting payment"; animation: ip-cycle-text 9s ease-in-out infinite; }
@keyframes ip-cycle {
  0%, 30% { border-color: rgba(252, 211, 77, 0.55); color: var(--warn); background: rgba(252, 211, 77, 0.05); }
  38%, 62% { border-color: rgba(111, 211, 255, 0.55); color: var(--accent); background: rgba(111, 211, 255, 0.05); }
  70%, 100% { border-color: rgba(125, 255, 212, 0.6); color: var(--pay); background: rgba(125, 255, 212, 0.08); box-shadow: 0 0 20px rgba(125, 255, 212, 0.15); }
}
@keyframes ip-cycle-text {
  0%, 30% { content: "● Awaiting payment"; }
  38%, 62% { content: "● Detected — confirming…"; }
  70%, 100% { content: "✓ Paid — confirmed"; }
}
.ip-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--card-border);
  font-size: 0.82rem;
  color: var(--muted);
}

/* Cards — Pay treatment: gradient hairline + icon-chip headers */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin: 2rem 0;
  position: relative;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.card::before {
  content: "";
  position: absolute;
  top: -1px; left: 1.75rem; right: 1.75rem;
  height: 2px;
  border-radius: 2px;
  background: var(--pay-gradient);
  opacity: 0.35;
  transition: opacity 0.2s ease;
}
.card:hover { border-color: rgba(125, 255, 212, 0.25); }
.card:hover::before { opacity: 0.8; }
.card h2 { margin-bottom: 0.5rem; }
.card h3 { margin: 1.5rem 0 0.75rem; }
.card p { color: var(--muted); }
.card p strong, .card li strong { color: var(--text); }
.card-head { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 0.5rem; }
.card-head .eyebrow { margin-bottom: 0.3rem; }
.card-head h2 { margin-bottom: 0.25rem; }
.icon-chip {
  flex: 0 0 auto;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: var(--pay-gradient);
  box-shadow: 0 4px 18px rgba(125, 255, 212, 0.25);
}

/* Form controls */
label { display: block; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.25rem; margin-bottom: 1rem; }
.grid2 > * { min-width: 0; } /* let grid items shrink below intrinsic content width (e.g. <pre>) so code blocks scroll internally instead of blowing out the viewport on mobile */
.grid2 > label { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.95rem; font-weight: 600; }
.row { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
.input {
  background: var(--bg-alt);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  color: var(--text);
  padding: 0.65rem 0.9rem;
  font-size: 0.92rem;
  font-family: var(--font);
  min-width: 240px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input.wide { flex: 1; min-width: min(280px, 100%); width: 100%; }
.input::placeholder { color: var(--muted); opacity: 0.7; }
.input:hover { border-color: rgba(125, 255, 212, 0.3); }
.input:focus { outline: none; border-color: var(--pay); box-shadow: 0 0 0 3px rgba(125, 255, 212, 0.15); }
.input:focus-visible { outline: 2px solid var(--pay); outline-offset: 2px; }
select.input { min-width: 0; cursor: pointer; }
select.input option { background: var(--bg-alt); }
textarea.input { resize: vertical; font-size: 0.82rem; line-height: 1.5; }

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

/* Hints / callouts */
.hint {
  margin-top: 1.25rem;
  background: rgba(125, 255, 212, 0.05);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 44rem;
}
.hint strong { color: var(--pay); }
.hint.ok { border-color: rgba(125, 255, 212, 0.35); }
.hint.ok strong { color: var(--good); }
.hint.warn { border-color: rgba(252, 211, 77, 0.4); background: rgba(252, 211, 77, 0.05); }
.hint.warn strong { color: var(--warn); }
.hint.err { border-color: rgba(252, 165, 165, 0.4); background: rgba(252, 165, 165, 0.05); }
.hint.err strong { color: var(--bad); }

/* Donate */
.donate-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}
.address-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin: 1.25rem 0 0.5rem;
}
.address {
  font-family: var(--mono);
  font-size: 0.8rem;
  background: #04070c;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 0.7rem 1rem;
  word-break: break-all;
  max-width: 100%;
  color: var(--pay);
}
.social-row { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; margin-top: 1.25rem; }

/* Footer — shared convention */
.footer { border-top: 1px solid var(--card-border); padding: 2.5rem 0 2rem; background: var(--bg-alt); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 0.75rem; }
.footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-links a { color: var(--muted); text-decoration: none; font-weight: 550; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--card-border); }
.address-inline { word-break: break-all; }

/* Badge */
.badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--pay-gradient);
  color: #04121c;
  padding: 0.15em 0.55em;
  border-radius: 999px;
  vertical-align: middle;
}

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .ip-status, .ip-status::after { animation: none; }
  .ip-status::after { content: "✓ Paid — confirmed"; }
  .ip-status { border-color: rgba(125, 255, 212, 0.6); color: var(--pay); }
}

/* Responsive */
@media (max-width: 900px) {
  .hero-pay { grid-template-columns: 1fr; gap: 2.5rem; }
  .invoice-preview { max-width: 420px; }
}
@media (max-width: 820px) {
  .grid2 { grid-template-columns: 1fr; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--card-border);
    padding: 1rem 1.5rem;
    gap: 0.9rem;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .conn { display: none; }
  .hero { padding: 3.5rem 0 3rem; }
  .card { padding: 1.25rem; margin: 1.5rem 0; }
  .brand { font-size: 1.1rem; }
}

/* Skip link: the first Tab stop on the page — parked off-screen until keyboard focus reveals it (fleet skip-link pass). */
.skip-link { position: absolute; left: 12px; top: -64px; z-index: 1000; padding: 10px 16px; border: 2px solid var(--pay); border-radius: 8px; background: #0b0e14; color: var(--pay); font-weight: 700; text-decoration: none; transition: top .15s ease; }
.skip-link:focus-visible { top: 12px; }
main:focus { outline: none; }

/* Reduced motion: when the OS asks for reduced motion, animations and transitions finish near-instantly and scrolling is not smoothed (fleet reduced-motion pass). Near-zero durations — not animation: none — so fade-ins still land on their end state and no content can be stranded invisible. Extends this page's targeted reduced-motion rules above. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
