/* CardMate marketing site — brand tokens from the Flutter app theme */
:root {
  --screen: #0b0f17;
  --panel: #141a24;
  --elevated: #1a2230;
  --border: #2a3444;
  --chip: #1e2736;
  --text: #f3f6fb;
  --muted: #8b95a8;
  --green: #22c55e;
  --green-dim: #16a34a;
  --cyan: #22d3ee;
  --teal: #14b8a6;
  --danger: #ef4444;
  --brand: linear-gradient(135deg, #22c55e 0%, #14b8a6 50%, #22d3ee 100%);
  --scan: linear-gradient(90deg, #22c55e 0%, #06b6d4 100%);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --header-h: 68px;
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --max: 1120px;
  --narrow: 720px;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--text);
  background:
    radial-gradient(1000px 520px at 85% -10%, rgba(34, 211, 238, 0.1), transparent 55%),
    radial-gradient(900px 480px at -5% 8%, rgba(34, 197, 94, 0.12), transparent 50%),
    var(--screen);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--cyan);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: var(--green);
  color: #052e16;
  font-weight: 700;
}

.skip-link:focus {
  top: 1rem;
}

.shell {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.shell.narrow {
  width: min(100% - 2.5rem, var(--narrow));
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-bottom: 1px solid transparent;
  background: rgba(11, 15, 23, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color 200ms ease, background 200ms ease;
}

.site-header.is-scrolled {
  border-bottom-color: rgba(42, 52, 68, 0.85);
  background: rgba(11, 15, 23, 0.9);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  width: 28px;
  height: auto;
  filter: drop-shadow(0 0 12px rgba(34, 197, 94, 0.15));
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.nav {
  display: none;
  align-items: center;
  gap: 1.5rem;
  margin-left: 1rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

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

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-actions .btn {
  display: none;
}

.nav-toggle {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  transform: translateY(3.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-3.5px) rotate(-45deg);
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1rem 1.25rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 15, 23, 0.98);
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
}

.mobile-nav .btn {
  margin-top: 0.35rem;
  text-align: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease,
    border-color 160ms ease, color 160ms ease;
}

.btn:hover {
  color: inherit;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  color: #052e16;
  background: var(--brand);
  background-size: 140% 140%;
  box-shadow: 0 10px 30px rgba(34, 197, 94, 0.22);
}

.btn-primary:hover {
  box-shadow: 0 14px 34px rgba(34, 211, 238, 0.22);
  color: #052e16;
}

.btn-ghost {
  color: var(--text);
  background: transparent;
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(26, 34, 48, 0.7);
  color: var(--text);
}

.btn-sm {
  min-height: 40px;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
}

/* Hero */
.hero {
  padding: 2.5rem 0 4rem;
  overflow: clip;
}

.hero-grid {
  display: grid;
  gap: 2.75rem;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  color: var(--cyan);
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.55rem, 7vw, 4.35rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.lede {
  margin: 1.15rem 0 0;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.12rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.availability {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  margin: 1.5rem 0 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.phone-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
}

.phone-stage-duo {
  min-height: 480px;
  width: min(100%, 380px);
  margin-inline: auto;
}

.phone-glow {
  position: absolute;
  inset: 18% 12%;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.22), transparent 65%);
  filter: blur(28px);
  z-index: 0;
  pointer-events: none;
}

.phone {
  position: relative;
  z-index: 1;
  width: min(100%, 280px);
  border-radius: 36px;
  padding: 10px;
  background: linear-gradient(160deg, #1f2937, #0b0f17 55%, #111827);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.phone-hero {
  width: min(100%, 300px);
  animation: float-in 700ms ease both;
}

.phone-stage-duo .phone-back {
  position: absolute;
  width: min(72%, 250px);
  right: 0;
  left: auto;
  top: 8%;
  z-index: 1;
  transform: rotate(8deg);
  animation: float-in 700ms ease both;
}

.phone-stage-duo .phone-front {
  position: relative;
  width: min(78%, 270px);
  margin-left: 0;
  margin-right: auto;
  z-index: 2;
  transform: rotate(-3deg);
  animation: float-in 700ms ease 80ms both;
}

.phone-sm {
  width: min(100%, 240px);
  margin-inline: auto;
}

@media (prefers-reduced-motion: reduce) {
  .phone-stage-duo .phone-back,
  .phone-stage-duo .phone-front {
    animation: none;
  }
}

.phone-notch {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 34%;
  height: 18px;
  border-radius: 999px;
  background: #05070c;
  z-index: 2;
  opacity: 0.85;
}

.phone-screen {
  width: 100%;
  border-radius: 28px;
  background: var(--screen);
  aspect-ratio: 471 / 1024;
  object-fit: cover;
  object-position: top center;
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Sections */
.section {
  padding: 4.5rem 0;
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2.5rem;
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0.85rem 0 0;
  color: var(--muted);
}

.feature-grid {
  display: grid;
  gap: 1rem;
}

.feature {
  padding: 1.45rem 1.35rem;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(26, 34, 48, 0.85), rgba(20, 26, 36, 0.9));
  border: 1px solid var(--border);
}

.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  color: var(--green);
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.22);
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.feature h3 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

/* Showcase */
.preview {
  background:
    linear-gradient(180deg, transparent, rgba(20, 26, 36, 0.65), transparent);
}

.showcase {
  display: grid;
  gap: 1.5rem;
}

.showcase-duo {
  gap: 1.25rem;
}

.showcase-card {
  margin: 0;
  padding: 1.25rem;
  border-radius: calc(var(--radius) + 4px);
  background: rgba(20, 26, 36, 0.72);
  border: 1px solid var(--border);
}

.showcase-card figcaption {
  margin-top: 1.15rem;
}

.showcase-card h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.showcase-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.mock-screen {
  position: relative;
  border-radius: 22px;
  background: var(--screen);
  border: 1px solid var(--border);
  overflow: hidden;
  min-height: 280px;
  padding: 1rem;
}

.mock-bar {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.mock-bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}

.mock-bar span:first-child {
  background: #ef4444;
}

.mock-bar span:nth-child(2) {
  background: #fbbf24;
}

.mock-bar span:nth-child(3) {
  background: #22c55e;
}

.mock-detail {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1rem;
  align-items: start;
}

.mock-card-art {
  position: relative;
  aspect-ratio: 0.72;
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(34, 197, 94, 0.55), rgba(34, 211, 238, 0.35)),
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.25), transparent 45%),
    var(--elevated);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.mock-badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(11, 15, 23, 0.82);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 700;
}

.mock-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.mock-detail-copy h4,
.mock-history h4 {
  margin: 0.2rem 0 0.7rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.mock-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.mock-chips span {
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: var(--chip);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--muted);
}

.mock-chips .fav {
  color: var(--green);
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.1);
}

.mock-price-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.mock-price-row .label {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  margin-bottom: 0.15rem;
}

.mock-price-row strong {
  color: var(--green);
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.mock-history-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.range-chips {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.range-chips span {
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: var(--chip);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.range-chips .active {
  color: #052e16;
  background: var(--scan);
  border-color: transparent;
}

.mock-chart {
  width: 100%;
  height: 120px;
  display: block;
}

.mock-note {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

/* How it works */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  counter-reset: none;
}

.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.25rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(20, 26, 36, 0.55);
}

.step-num {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: #052e16;
  background: var(--brand);
}

.steps h3 {
  margin: 0.15rem 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.75rem;
}

.faq-list details {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(20, 26, 36, 0.65);
  padding: 0.15rem 1rem 0.15rem;
}

.faq-list summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.75rem 1rem 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  position: relative;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "";
  position: absolute;
  right: 0.15rem;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 160ms ease;
}

.faq-list details[open] summary::after {
  transform: translateY(-20%) rotate(225deg);
}

.faq-list details p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.98rem;
}

/* CTA */
.cta {
  padding-top: 2rem;
}

.cta-panel {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: 2.5rem 1.5rem;
  border: 1px solid rgba(34, 197, 94, 0.28);
  background:
    radial-gradient(600px 240px at 15% 0%, rgba(34, 197, 94, 0.18), transparent 60%),
    radial-gradient(500px 220px at 100% 100%, rgba(34, 211, 238, 0.14), transparent 55%),
    var(--panel);
  text-align: center;
}

.cta-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.15rem;
  border-radius: 18px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 12px 30px rgba(0, 0, 0, 0.35);
}

.cta-copy h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  letter-spacing: -0.02em;
}

.cta-copy p {
  margin: 0.8rem auto 0;
  max-width: 34rem;
  color: var(--muted);
}

.cta-copy .hero-actions {
  justify-content: center;
}

/* Footer */
.site-footer {
  margin-top: 3rem;
  padding: 2.75rem 0 2.5rem;
  border-top: 1px solid var(--border);
  background: rgba(8, 11, 16, 0.7);
}

.footer-inner {
  display: grid;
  gap: 1.25rem;
}

.footer-tag {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
}

.footer-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.footer-nav a:hover {
  color: var(--text);
}

.disclaimer {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
  max-width: 52rem;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-meta .dot {
  opacity: 0.5;
}

/* Responsive */
@media (min-width: 720px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .showcase,
  .showcase-duo {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .steps li {
    grid-template-columns: 1fr;
  }

  .cta-panel {
    padding: 3.25rem 2.5rem;
  }
}

@media (min-width: 900px) {
  .nav {
    display: flex;
  }

  .header-actions .btn {
    display: inline-flex;
  }

  .nav-toggle {
    display: none;
  }

  .mobile-nav {
    display: none !important;
  }

  .hero {
    padding: 3.5rem 0 5.5rem;
  }

  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 2rem;
  }

  .phone-stage-duo {
    width: min(100%, 440px);
    min-height: 540px;
  }

  .phone-stage-duo .phone-back {
    width: min(70%, 280px);
  }

  .phone-stage-duo .phone-front {
    width: min(76%, 300px);
  }

  .showcase-duo {
    grid-template-columns: repeat(2, 1fr);
    max-width: 720px;
    margin-inline: auto;
  }
}

@media (max-width: 419px) {
  .shell {
    width: min(100% - 1.5rem, var(--max));
  }

  .mock-detail {
    grid-template-columns: 1fr;
  }

  .mock-card-art {
    width: 120px;
  }
}
