*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --ink: #0B1220; --muted: #5A6473; --line: #E6E9EF;
  --primary: #1E3A8A; --primary-dark: #0F1D52; --accent: #10B981;
  --tint: #F5F7FB; --danger: #DC2626;
}
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; color: var(--ink); background: var(--tint); line-height: 1.55; font-size: 15px; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--primary); text-decoration: none; } a:hover { text-decoration: underline; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; width: 100%; }

header { padding: 18px 0; background: #fff; border-bottom: 1px solid var(--line); }
header .wrap { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -0.02em; color: var(--ink); }
.logo-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; letter-spacing: 0.04em; }
.secure-badge { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 500; }

main { flex: 1; }

/* Pay page */
.pay-page { padding: 40px 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1.1fr; gap: 32px; align-items: start; }
.section-eyebrow { font-size: 10px; font-weight: 700; color: var(--primary); letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 12px; }

.order-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 30px; }
.order-total { font-size: 42px; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); line-height: 1; }
.order-total .ccy { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.order-ref { color: var(--muted); font-size: 13px; margin-top: 8px; margin-bottom: 20px; font-family: 'JetBrains Mono', 'Monaco', monospace; }
.order-ref strong { color: var(--ink); }
.items { list-style: none; border-top: 1px solid var(--line); padding-top: 16px; }
.items li { display: flex; align-items: center; gap: 12px; padding: 8px 0; font-size: 13.5px; }
.items li .qty { color: var(--muted); font-family: 'JetBrains Mono', monospace; font-size: 12px; min-width: 30px; }
.items li .name { flex: 1; color: var(--ink); }
.items li .price { font-weight: 600; color: var(--ink); }
.trust-row { display: flex; gap: 14px; margin-top: 20px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trust-row div { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); font-weight: 500; }
.trust-row div svg { color: var(--accent); }
.powered-by { font-size: 11px; color: var(--muted); margin-top: 14px; line-height: 1.55; }

.pay-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 30px; }
#payment-element { min-height: 220px; margin-bottom: 20px; }
.btn-pay { width: 100%; padding: 14px 20px; background: var(--primary); color: #fff; border: 0; border-radius: 999px; font-weight: 700; font-size: 15px; cursor: pointer; transition: background 0.15s; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-pay:hover:not(:disabled) { background: var(--primary-dark); }
.btn-pay:disabled { opacity: 0.7; cursor: not-allowed; }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.35); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pay-message { margin-top: 14px; padding: 10px 14px; background: #FEE2E2; color: var(--danger); border-radius: 10px; font-size: 13px; }
.fine-print { font-size: 11px; color: var(--muted); margin-top: 16px; line-height: 1.6; }

/* Error page */
.error-page { padding: 80px 0; }
.error-page .wrap { max-width: 480px; text-align: center; }
.error-icon { width: 72px; height: 72px; margin: 0 auto 24px; border-radius: 50%; background: #FEE2E2; color: var(--danger); display: flex; align-items: center; justify-content: center; }
.error-page h1 { font-size: 26px; font-weight: 700; margin-bottom: 12px; color: var(--ink); }
.error-msg { color: var(--ink); font-size: 15px; margin-bottom: 16px; }
.error-help { color: var(--muted); font-size: 13px; line-height: 1.6; }

/* Home page */
.home-page { padding: 100px 0; }
.home-hero { max-width: 660px; text-align: center; margin: 0 auto; }
.home-hero .badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; background: #E8EEFB; color: var(--primary-dark); border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 24px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.home-hero h1 { font-size: 40px; line-height: 1.14; letter-spacing: -0.028em; font-weight: 800; margin-bottom: 20px; }
.home-hero .lead { font-size: 16px; color: var(--muted); margin-bottom: 28px; }
.btn-primary { display: inline-flex; padding: 12px 22px; background: var(--primary); color: #fff; border-radius: 999px; font-weight: 600; font-size: 14px; }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; }

footer { padding: 24px 0; border-top: 1px solid var(--line); background: #fff; font-size: 12px; color: var(--muted); }
footer .wrap { display: flex; justify-content: space-between; }

@media (max-width: 780px) {
  .grid-2 { grid-template-columns: 1fr; gap: 20px; }
  .home-hero h1 { font-size: 30px; }
  footer .wrap { flex-direction: column; gap: 6px; text-align: center; }
}
