/* U GOT MAIL — airmail theme */
:root {
  --paper: #F6F0E2;
  --paper-2: #EFE7D4;
  --card: #FFFCF4;
  --line: #DCD2BC;
  --line-strong: #C9BEA5;
  --text: #1F2438;
  --muted: #535869;
  --ink: #33468F;       /* the blue of the handwriting */
  --ink-dark: #26356F;
  --air-blue: #41589C;  /* stripe blue */
  --air-red: #DB3C36;   /* stripe red */
  --red-text: #A82A25;
  --sky: #7AADCD;       /* stamp blue */
  --stripe: repeating-linear-gradient(-45deg, var(--air-red) 0 16px, var(--paper) 16px 26px, var(--air-blue) 26px 42px, var(--paper) 42px 52px);

  --hand: 'Kalam', 'Comic Neue', 'Segoe Print', cursive;
  --body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --pad: clamp(20px, 5.5vw, 80px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--ink); }
a:hover { color: var(--ink-dark); }
input, textarea, button { font: inherit; color: inherit; }
input::placeholder, textarea::placeholder { color: #8A8778; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--ink); color: var(--card); padding: 10px 16px; border-radius: 8px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 14px var(--pad);
  background: rgba(246, 240, 226, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--stripe); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand:hover { color: var(--text); }
.brand img { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; box-shadow: 0 1px 3px rgba(31, 36, 56, .2); }
.brand span { font-family: var(--hand); font-weight: 700; font-size: 26px; color: var(--ink); letter-spacing: .5px; }
.nav-links { display: flex; align-items: center; gap: 32px; font-weight: 500; }
.nav-links a { text-decoration: none; color: var(--text); }
.nav-links a:hover { color: var(--ink); }
.pill-outline {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px;
  border: 2px solid var(--ink); border-radius: 999px;
  color: var(--ink) !important; font-weight: 600; text-decoration: none; background: var(--card);
}
.pill-outline:hover { background: var(--ink); color: var(--card) !important; }
@media (max-width: 760px) {
  .nav-links a:not(.pill-outline) { display: none; }
}

/* ---------- Banner ---------- */
.banner { max-width: 1100px; margin: 0 auto; padding: 36px var(--pad) 0; }
.banner img {
  width: 100%; height: auto; border-radius: 4px;
  box-shadow: 0 2px 0 rgba(31, 36, 56, .06), 0 22px 40px -24px rgba(31, 36, 56, .45);
}
@media (prefers-reduced-motion: no-preference) {
  .banner img { animation: arrive .9s cubic-bezier(.2, .8, .2, 1) both; }
  @keyframes arrive { from { opacity: 0; transform: translateY(-18px) rotate(-1.5deg); } to { opacity: 1; transform: none; } }
}

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 5vw, 72px);
  align-items: center; padding: 64px var(--pad) 120px;
  max-width: 1440px; margin: 0 auto;
}
.envelope-tag {
  display: inline-block; padding: 7px 14px; margin: 0 0 22px;
  border: 1.5px dashed var(--ink); border-radius: 4px;
  font-family: var(--mono); font-size: 13px; font-weight: 700; letter-spacing: 1px; color: var(--ink);
  transform: rotate(-1.5deg);
}
.hero h1 {
  margin: 0 0 22px;
  font-family: var(--hand); font-weight: 700; text-transform: uppercase; color: var(--ink);
  font-size: clamp(54px, 7vw, 104px); line-height: 0.98; letter-spacing: 0;
}
.lede { margin: 0 0 28px; max-width: 34em; font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); }
.checks { display: flex; flex-wrap: wrap; gap: 14px 32px; margin: 0; padding: 0; list-style: none; font-weight: 600; }
.checks li { display: flex; align-items: center; gap: 8px; }
.checks svg { flex: none; }
@media (max-width: 960px) { .hero { grid-template-columns: minmax(0, 1fr); padding-top: 40px; padding-bottom: 88px; } }

/* ---------- Envelope card (send / claim) ---------- */
.glow-frame {
  padding: 12px; border-radius: 6px; background: var(--stripe);
  box-shadow: 0 30px 50px -30px rgba(31, 36, 56, .5);
}
.card { background: var(--card); border-radius: 2px; padding: clamp(24px, 3vw, 36px); min-height: 560px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.card-head h2 { margin: 0; font-family: var(--hand); font-size: 34px; font-weight: 700; color: var(--ink); line-height: 1.05; }
.card-head p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.addr { font-family: var(--mono); font-size: 12px; line-height: 1.6; text-align: right; color: var(--muted); word-break: break-all; max-width: 45%; }

.field { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.field label { font-size: 14px; font-weight: 600; }
.field label small { font-size: 14px; font-weight: 400; color: var(--muted); }
.input {
  width: 100%; min-height: 56px; padding: 0 18px;
  border: 1.5px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--text);
  font-size: 18px;
}
.input:focus { outline: 3px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
.input.amount { min-height: 64px; font-family: var(--mono); font-size: 30px; font-weight: 700; color: var(--ink); }
textarea.input { padding: 14px 18px; resize: none; font-size: 17px; }

.tokens { display: flex; gap: 8px; }
.token {
  flex: 1; min-height: 44px; border: 1.5px solid var(--line-strong); border-radius: 999px;
  background: #fff; color: var(--text); font-family: var(--mono); font-weight: 700; font-size: 15px; cursor: pointer;
}
.token:hover { border-color: var(--ink); }
.token[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--card); }

.alert {
  padding: 12px 16px; border-radius: 8px; margin-bottom: 18px;
  background: #FBE4E1; border: 1px solid #EBA9A4; color: var(--red-text); font-size: 15px; font-weight: 600;
}
.fee { display: flex; justify-content: space-between; gap: 12px; padding-top: 16px; margin-bottom: 18px; border-top: 1.5px dashed var(--line-strong); color: var(--muted); font-size: 14px; }
.fee span:last-child { font-family: var(--mono); }

.btn-primary {
  width: 100%; min-height: 62px; border: none; border-radius: 8px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  background: var(--ink); color: var(--card);
  font-family: var(--hand); font-weight: 700; font-size: 26px;
  box-shadow: 0 3px 0 var(--ink-dark);
  transition: transform .1s, box-shadow .1s, background .15s;
}
.btn-primary:hover { background: var(--ink-dark); }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink-dark); }

.done { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; min-height: 500px; text-align: center; }
.done img { width: 190px; height: 190px; aspect-ratio: 1; object-fit: cover; border-radius: 4px; box-shadow: 0 16px 30px -16px rgba(31, 36, 56, .5); transform: rotate(-4deg); }
.done h2 { margin: 0; font-family: var(--hand); font-weight: 700; font-size: 44px; color: var(--ink); line-height: 1; }
.done .big { font-family: var(--mono); font-weight: 700; font-size: 26px; color: var(--ink); }
.done p { margin: 0; max-width: 24em; color: var(--muted); }
.done p strong { color: var(--text); word-break: break-all; }
.row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.btn-ghost {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; cursor: pointer;
  border: 2px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink);
  font-weight: 600; font-size: 16px; text-decoration: none;
}
.btn-ghost:hover { background: var(--ink); color: var(--card); }
.btn-link { min-height: 48px; padding: 0 16px; border: none; background: transparent; color: var(--red-text); font-weight: 600; text-decoration: underline; cursor: pointer; }

@media (prefers-reduced-motion: no-preference) {
  .done img { animation: post .7s cubic-bezier(.2, .8, .2, 1) both; }
  @keyframes post { from { opacity: 0; transform: translate(-50px, 30px) rotate(-14deg) scale(.8); } to { opacity: 1; transform: rotate(-4deg); } }
}

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 9vw, 120px) var(--pad); }
.section.alt { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.wrap { max-width: 1280px; margin: 0 auto; }
.h2 { margin: 0; font-family: var(--hand); font-weight: 700; text-transform: uppercase; color: var(--ink); font-size: clamp(40px, 5vw, 68px); line-height: 1; }
.intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin-bottom: 56px; }
.intro p { margin: 0; max-width: 26em; font-size: 19px; color: var(--muted); }
@media (max-width: 860px) { .intro { flex-direction: column; align-items: flex-start; gap: 20px; margin-bottom: 40px; } }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin: 0; padding: 0; list-style: none; }
.step { position: relative; padding: 40px 32px 32px; background: var(--card); border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 12px 24px -20px rgba(31, 36, 56, .5); }
.step::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: var(--stripe); border-radius: 4px 4px 0 0; }
.step .num { font-family: var(--hand); font-weight: 700; font-size: 20px; color: var(--air-red); margin-bottom: 12px; }
.step h3 { margin: 0 0 12px; font-family: var(--hand); font-weight: 700; font-size: 30px; line-height: 1.1; color: var(--ink); }
.step p { margin: 0; color: var(--muted); }
@media (max-width: 960px) { .steps { grid-template-columns: minmax(0, 1fr); } }

.security { display: grid; grid-template-columns: minmax(0, 480px) minmax(0, 1fr); gap: clamp(40px, 6vw, 88px); align-items: center; }
.security > img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 4px; box-shadow: 0 30px 50px -30px rgba(31, 36, 56, .55); transform: rotate(-2deg); }
.security .h2 { margin-bottom: 20px; }
.security > div > p { margin: 0 0 36px; max-width: 32em; font-size: 19px; color: var(--muted); }
.points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 40px; }
.points div { border-top: 1.5px dashed var(--line-strong); padding-top: 18px; }
.points h3 { margin: 0 0 8px; font-size: 19px; }
.points p { margin: 0; font-size: 16px; color: var(--muted); }
@media (max-width: 960px) { .security { grid-template-columns: minmax(0, 1fr); } .security > img { max-width: 440px; } }
@media (max-width: 560px) { .points { grid-template-columns: minmax(0, 1fr); } }

.faq { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 80px; }
.faq-list { border-top: 1.5px solid var(--line-strong); }
.faq details { border-bottom: 1.5px solid var(--line-strong); }
.faq summary {
  list-style: none; cursor: pointer; min-height: 76px; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  font-size: 21px; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); font-size: 28px; color: var(--air-red); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 28px; max-width: 42em; font-size: 18px; color: var(--muted); }
@media (max-width: 960px) { .faq { grid-template-columns: minmax(0, 1fr); gap: 36px; } }

/* ---------- Footer ---------- */
.footer { background: var(--card); border-top: 12px solid transparent; border-image: var(--stripe) 12; }
.footer-cta { display: flex; justify-content: space-between; align-items: center; gap: 40px; padding: clamp(64px, 8vw, 96px) var(--pad) 56px; max-width: 1440px; margin: 0 auto; }
.footer-cta p { margin: 0; font-family: var(--hand); font-weight: 700; text-transform: uppercase; color: var(--ink); font-size: clamp(48px, 6.5vw, 92px); line-height: 1; }
.btn-cta {
  flex: none; display: inline-flex; align-items: center; min-height: 64px; padding: 0 36px; border-radius: 999px;
  background: var(--air-red); color: #fff !important; text-decoration: none;
  font-family: var(--hand); font-weight: 700; font-size: 26px;
  box-shadow: 0 3px 0 #A52B26;
}
.btn-cta:hover { background: #C3322D; }
.footer-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 24px var(--pad) 32px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.footer-meta strong { font-family: var(--hand); font-size: 18px; color: var(--ink); }
@media (max-width: 760px) { .footer-cta { flex-direction: column; align-items: flex-start; } }

/* ---------- Claim page ---------- */
.claim { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 6vw, 80px); align-items: center; max-width: 1440px; margin: 0 auto; padding: clamp(40px, 6vw, 72px) var(--pad) 96px; }
.claim-art img { width: 100%; height: auto; max-width: 400px; aspect-ratio: 1; object-fit: cover; border-radius: 4px; box-shadow: 0 30px 50px -30px rgba(31, 36, 56, .55); transform: rotate(-2deg); }
.claim h1 { margin: 32px 0 20px; font-family: var(--hand); font-weight: 700; text-transform: uppercase; color: var(--ink); font-size: clamp(44px, 5.5vw, 80px); line-height: 1; }
.note { margin: 0 0 24px; padding-left: 20px; border-left: 3px solid var(--air-red); font-family: var(--hand); font-size: 24px; line-height: 1.35; }
.sealed { display: inline-flex; align-items: baseline; gap: 14px; padding: 14px 22px; border: 1.5px dashed var(--ink); border-radius: 6px; background: var(--card); }
.sealed span:first-child { font-size: 14px; font-weight: 600; color: var(--muted); }
.sealed span:last-child { font-family: var(--mono); font-weight: 700; font-size: 30px; color: var(--ink); }
.progress { font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--muted); }
.card.claim-card { min-height: 480px; display: flex; flex-direction: column; justify-content: center; }
.claim-card h2 { margin: 0 0 14px; font-family: var(--hand); font-weight: 700; font-size: 36px; line-height: 1.05; color: var(--ink); }
.claim-card > div > p, .claim-card > form > p { margin: 0 0 22px; color: var(--muted); }
.claim-card strong { color: var(--text); word-break: break-all; }
.input.code { min-height: 72px; font-family: var(--mono); font-size: 34px; font-weight: 700; letter-spacing: 14px; color: var(--ink); }
.dests { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.dest {
  min-height: 104px; padding: 18px; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 6px;
  border: 1.5px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--text);
}
.dest strong { font-size: 18px; }
.dest span { font-size: 14px; line-height: 1.4; color: var(--muted); }
.dest:hover { border-color: var(--ink); }
.dest[aria-pressed="true"] { border: 2px solid var(--ink); background: #EEF1FA; }
.center { text-align: center; }
.resend { display: block; margin: 12px auto 0; min-height: 44px; border: none; background: transparent; color: var(--ink); font-weight: 600; text-decoration: underline; cursor: pointer; }
@media (max-width: 960px) { .claim { grid-template-columns: minmax(0, 1fr); } .claim-art img { max-width: 300px; } }
@media (max-width: 480px) { .dests { grid-template-columns: minmax(0, 1fr); } .input.code { letter-spacing: 8px; font-size: 28px; } }

/* ---------- Live app pieces ---------- */
.devnet { padding: 8px var(--pad); background: var(--ink); color: var(--card); font-size: 14px; font-weight: 600; text-align: center; }
.mono { font-family: var(--mono); font-size: 15px; word-break: break-all; }
.small { font-size: 14px; line-height: 1.55; color: var(--muted); }
.status-line { min-height: 22px; margin: 14px 0 0; font-size: 15px; color: var(--muted); text-align: center; }
.status-line .btn-ghost { margin-top: 4px; }
button[disabled] { opacity: .6; cursor: progress; }

.wallet-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; margin-bottom: 22px; border: 1.5px dashed var(--line-strong); border-radius: 8px; font-size: 14px; color: var(--muted); }
.btn-small { min-height: 44px; padding: 0 16px; border: 2px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer; flex: none; }
.btn-small:hover { background: var(--ink); color: var(--card); }
.btn-small.spaced { margin: -8px 0 22px; }
.field-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 520px) { .field-pair { grid-template-columns: minmax(0, 1fr); gap: 0; } }

.done .small { max-width: 26em; }
.row.left { justify-content: flex-start; margin: 14px 0; }
.secret { display: grid; gap: 6px; padding: 16px; margin: 14px 0 0; border: 1.5px dashed var(--air-red); border-radius: 8px; background: #fff; }
.secret-label { font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 6px; }
.secret-label:first-child { margin-top: 0; }
.secret-key { color: var(--red-text); user-select: all; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-bottom: 18px; font-weight: 600; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--ink); }

.status-page { max-width: 820px; margin: 0 auto; padding: clamp(40px, 6vw, 72px) var(--pad) 96px; }
.status-page .h2 { margin-bottom: 28px; }
.status-page .lede { margin-top: -12px; }
.status-card { min-height: 0; }
.status-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.big-amount { font-family: var(--mono); font-weight: 700; font-size: clamp(28px, 4vw, 40px); color: var(--ink); }
.badge { padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--line-strong); font-size: 14px; font-weight: 600; }
.badge[data-state="funded"] { border-color: var(--ink); color: var(--ink); background: #EEF1FA; }
.badge[data-state="claimed"] { border-color: #2F7A4F; color: #2F7A4F; background: #E8F3EC; }
.badge[data-state="cancelled"], .badge[data-state="returned"] { border-color: var(--air-red); color: var(--red-text); background: #FBE4E1; }
.facts { display: grid; margin: 0 0 18px; }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; word-break: break-all; }
.btn-cancel { width: 100%; min-height: 54px; margin-top: 8px; border: 2px solid var(--air-red); border-radius: 8px; background: transparent; color: var(--red-text); font-weight: 700; font-size: 17px; cursor: pointer; }
.btn-cancel:hover { background: #FBE4E1; }
.send-list { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--line-strong); }
.send-list a { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; padding: 18px 0; border-bottom: 1.5px solid var(--line-strong); text-decoration: none; color: var(--text); }
.send-list strong { font-family: var(--mono); color: var(--ink); }
.send-list .when { margin-left: auto; font-size: 14px; color: var(--muted); }

/* Small screens */
.brand span, .pill-outline { white-space: nowrap; }
@media (max-width: 480px) {
  .brand { gap: 10px; }
  .brand img { width: 38px; height: 38px; }
  .brand span { font-size: 21px; }
  .pill-outline { padding: 0 14px; font-size: 14px; }
  .addr { display: none; }
  .wallet-row { flex-wrap: wrap; }
}

[hidden] { display: none !important; }
