@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&family=Inter:wght@400;500;600&display=swap");

:root {
  --font: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Plus Jakarta Sans", var(--font);

  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --slate-950: #020617;

  --indigo-50: #eef2ff;
  --indigo-100: #e0e7ff;
  --indigo-500: #6366f1;
  --indigo-600: #4f46e5;
  --indigo-700: #4338ca;

  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-50: #ecfdf5;

  --rose-500: #f43f5e;
  --rose-600: #e11d48;
  --rose-50: #fff1f2;

  --amber-500: #f59e0b;
  --amber-50: #fffbeb;

  --bg: #ffffff;
  --bg-subtle: var(--slate-50);
  --bg-muted: var(--slate-100);
  --bg-elevated: #ffffff;
  --fg: var(--slate-900);
  --fg-muted: var(--slate-500);
  --fg-subtle: var(--slate-600);
  --border: var(--slate-200);
  --border-strong: var(--slate-300);

  --primary: var(--indigo-600);
  --primary-hover: var(--indigo-700);
  --primary-light: var(--indigo-500);
  --primary-fg: #ffffff;
  --primary-muted: var(--indigo-50);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 999px;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 12px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08), 0 4px 8px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 16px 48px rgba(15, 23, 42, 0.1), 0 8px 16px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 8px 32px rgba(79, 70, 229, 0.22);

  --header-h: 72px;
  --content-w: 1180px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --transition: 180ms var(--ease);
  --transition-slow: 320ms var(--ease);
  --ring: rgba(79, 70, 229, 0.18);

  /* Legacy aliases */
  --font-body: var(--font);
  --ink: var(--fg);
  --ink-muted: var(--fg-muted);
  --ink-secondary: var(--fg-subtle);
  --ink-faint: var(--slate-400);
  --canvas: var(--bg-subtle);
  --canvas-elevated: var(--slate-50);
  --surface: var(--bg);
  --surface-solid: var(--bg);
  --surface-muted: var(--bg-muted);
  --surface-hover: var(--slate-50);
  --brand: var(--primary);
  --brand-deep: var(--primary-hover);
  --brand-soft: var(--primary-muted);
  --accent: var(--emerald-600);
  --accent-soft: var(--emerald-50);
  --success: var(--emerald-600);
  --success-bg: var(--emerald-50);
  --success-border: #a7f3d0;
  --danger: var(--rose-600);
  --danger-bg: var(--rose-50);
  --text: var(--fg);
  --text-muted: var(--fg-muted);
  --text-soft: var(--fg-subtle);
  --gradient-brand: linear-gradient(135deg, var(--indigo-600) 0%, var(--indigo-700) 100%);
  --gradient-hero: linear-gradient(180deg, #ffffff 0%, var(--slate-50) 100%);
  --gold: var(--amber-500);
  --gold-soft: var(--amber-50);
  --radius-xs: 6px;
  --radius-md: var(--radius-lg);
  --zinc-50: var(--slate-50);
  --zinc-100: var(--slate-100);
  --zinc-200: var(--slate-200);
  --zinc-300: var(--slate-300);
  --zinc-400: var(--slate-400);
  --zinc-500: var(--slate-500);
  --zinc-600: var(--slate-600);
  --zinc-700: var(--slate-700);
  --zinc-800: var(--slate-800);
  --zinc-900: var(--slate-900);
  --green-600: var(--emerald-600);
  --green-50: var(--emerald-50);
  --red-600: var(--rose-600);
  --red-50: var(--rose-50);
  --blue-600: var(--indigo-600);
  --blue-700: var(--indigo-700);
  --blue-50: var(--indigo-50);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg-subtle);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(16, 185, 129, 0.05), transparent),
    var(--bg-subtle);
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ——— Navigation ——— */
.nav-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
}

.nav-bar__inner {
  max-width: var(--content-w);
  height: 100%;
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--fg);
  justify-self: start;
}

.logo__mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--gradient-brand);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.logo__mark svg {
  width: 18px;
  height: 18px;
}

.logo__text {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.shell-nav {
  justify-self: center;
}

.shell-nav__track {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: var(--radius-full);
  background: var(--bg-muted);
  border: 1px solid var(--border);
}

.shell-nav a {
  text-decoration: none;
  color: var(--fg-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  transition: color var(--transition), background var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}

.shell-nav a:hover {
  color: var(--fg);
}

.shell-nav a[aria-current="page"] {
  color: var(--fg);
  background: var(--bg);
  box-shadow: var(--shadow-xs);
}

.compare-pill {
  justify-self: end;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--radius-full);
  transition: all var(--transition);
}

.compare-pill:not(.is-empty) {
  background: var(--gradient-brand);
  color: var(--primary-fg);
  box-shadow: var(--shadow-sm), var(--shadow-glow);
}

.compare-pill:not(.is-empty):hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow), var(--shadow-glow);
}

.compare-pill.is-empty {
  background: var(--bg);
  color: var(--fg-muted);
  border: 1px solid var(--border);
}

.compare-pill.is-empty:hover {
  border-color: var(--border-strong);
  color: var(--fg);
}

/* Legacy */
.site-header,
.page-header,
.top-nav,
.site-brand,
.site-header__row,
.page-intro,
.brand-icon {
  display: none;
}

.quick-links {
  display: contents;
}

/* ——— Layout ——— */
.shell-main {
  flex: 1;
}

.shell-content {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 40px 28px 72px;
}

/* ——— Page heroes ——— */
.page-hero,
.hero-banner {
  position: relative;
  overflow: hidden;
  background: var(--gradient-hero);
  border-bottom: 1px solid var(--border);
}

.page-hero::before,
.hero-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--slate-300) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.35;
  mask-image: linear-gradient(to bottom, black 40%, transparent);
  pointer-events: none;
}

.page-hero__inner,
.hero-banner__inner {
  position: relative;
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 48px 28px 52px;
}

.page-hero--compact .page-hero__inner {
  padding: 36px 28px 40px;
}

.page-hero__eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}

.page-hero h1,
.hero-banner h1 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.08;
  color: var(--fg);
  max-width: 18ch;
}

.page-hero--compact h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  max-width: none;
}

.page-hero p,
.hero-banner p {
  margin: 0;
  font-size: 17px;
  line-height: 1.65;
  color: var(--fg-muted);
  max-width: 52ch;
}

.hero-banner__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-subtle);
  box-shadow: var(--shadow-xs);
}

.hero-stat strong {
  color: var(--fg);
  font-weight: 700;
}

.page-heading {
  margin-bottom: 32px;
}

.page-heading h1 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.125rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
  color: var(--fg);
}

.page-heading p {
  margin: 0;
  font-size: 16px;
  color: var(--fg-muted);
  max-width: 540px;
  line-height: 1.6;
}

/* ——— Panels & surfaces ——— */
.glass-panel,
.panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.section-label {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
}

/* ——— States ——— */
.state-message {
  margin: 0 0 20px;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
}

.state-message:empty {
  display: none;
}

.state-info {
  color: var(--primary-hover);
  background: var(--primary-muted);
  border: 1px solid var(--indigo-100);
}

.state-empty {
  color: var(--fg-muted);
  background: var(--bg-muted);
  border: 1px solid var(--border);
}

.state-error {
  color: var(--rose-600);
  background: var(--rose-50);
  border: 1px solid #fecdd3;
}

/* ——— Buttons ——— */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  padding: 11px 20px;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--gradient-brand);
  color: var(--primary-fg);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow), var(--shadow-glow);
}

.btn-primary:disabled {
  background: var(--slate-200);
  color: var(--slate-400);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-muted);
  border-color: var(--border-strong);
}

/* Apply (issuer handoff) — quiet; primary actions stay on card/compare */
.btn-apply,
a.btn-apply {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  color: var(--fg-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  box-shadow: none;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.btn-apply:hover,
a.btn-apply:hover {
  color: var(--fg-subtle);
  border-color: var(--border-strong);
  background: var(--bg-muted);
  transform: none;
  box-shadow: none;
}

/* Text link — home grid, compare footer */
.btn-apply--text,
a.btn-apply--text {
  padding: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--slate-400);
  background: none;
  border: none;
  border-radius: 0;
}

.btn-apply--text:hover,
a.btn-apply--text:hover {
  color: var(--primary);
  background: none;
  text-decoration: underline;
}

.btn-apply--compact {
  padding: 5px 10px;
  font-size: 12px;
}

.card-grid-actions .btn-apply--text {
  width: auto;
  margin-left: auto;
}

.btn-apply--large,
.apply-link.btn-apply--large {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  margin-top: 8px;
  color: var(--fg-subtle);
}

.btn-apply.is-disabled,
span.btn-apply.is-disabled {
  background: var(--slate-200);
  color: var(--slate-400);
  cursor: not-allowed;
  box-shadow: none;
  pointer-events: none;
}

.apply-block {
  margin-top: 8px;
}

.apply-note {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--fg-muted);
  max-width: 48ch;
}

/* ——— Card visuals ——— */
.card-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 1.586 / 1;
  min-height: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--slate-800);
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--transition-slow), transform var(--transition-slow);
}

.card-grid-item:hover .card-visual,
.pack-card:hover .card-visual {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px) scale(1.01);
}

.card-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.card-art.card-art--svg svg {
  width: 100%;
  height: 100%;
  display: block;
}

img.card-art {
  object-fit: cover;
}

.card-visual-overlay {
  display: none;
}

.chip {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.chip--fee-free {
  background: var(--emerald-50);
  color: var(--emerald-600);
}

.chip--reward {
  background: var(--indigo-50);
  color: var(--indigo-700);
}

/* ——— Footer ——— */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 28px;
}

.site-footer__inner {
  max-width: var(--content-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.02em;
  color: var(--fg);
}

.site-footer__brand span:first-child {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--gradient-brand);
  display: grid;
  place-items: center;
}

.site-footer__brand svg {
  width: 14px;
  height: 14px;
}

.site-footer__copy {
  margin: 0;
  font-size: 13px;
  color: var(--fg-muted);
}

.site-footer__links {
  display: flex;
  gap: 20px;
}

.site-footer__links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.site-footer__links a:hover {
  color: var(--primary);
}

.page {
  max-width: none;
  padding: 0;
  margin: 0;
}

@media (max-width: 900px) {
  .nav-bar__inner {
    grid-template-columns: 1fr auto;
    padding: 0 20px;
    gap: 16px;
  }

  .shell-nav {
    grid-column: 1 / -1;
    order: 3;
    justify-self: stretch;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  .shell-nav__track {
    width: max-content;
  }

  .compare-pill {
    justify-self: end;
  }
}

@media (max-width: 768px) {
  .shell-content {
    padding: 28px 20px 56px;
  }

  .page-hero__inner,
  .hero-banner__inner {
    padding: 32px 20px 36px;
  }

  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .nav-bar {
    height: auto;
    min-height: 64px;
  }

  .nav-bar__inner {
    padding: 12px 16px 14px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
  }

  .logo {
    flex: 1;
  }

  .shell-nav {
    order: 3;
    width: 100%;
  }

  .hero-banner h1,
  .page-hero h1 {
    max-width: none;
  }
}
