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

:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --border: #222222;
  --border-amber: rgba(245, 158, 11, 0.2);
  --text: #f0f0f0;
  --muted: #888888;
  --accent: #a78bfa;
  --accent-hover: #8b5cf6;
  --badge-live: #4ade80;
  --badge-soon: #fbbf24;
  --radius: 12px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
header {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(245, 158, 11, 0.25);
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.logo-icon {
  display: block;
  flex-shrink: 0;
}

.logo-word {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f59e0b;
}

.logo-cafe { color: #ffffff; }

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  margin-left: 1.5rem;
  transition: color 0.15s;
}
nav a:hover { color: var(--text); }
footer a:hover { color: var(--text); }

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 5rem 1rem 3rem;
  max-width: 640px;
  margin: 0 auto;
}

.hero-brand {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.cycle-wrap {
  display: inline-block;
  position: relative;
}

.cycle-text {
  color: var(--accent);
  transition: color 0.2s;
}

.cursor {
  display: inline-block;
  color: var(--muted);
  animation: blink 0.9s step-end infinite;
  margin-left: 2px;
  font-weight: 300;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero p {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.6;
}

/* ── Search ── */
.search-wrap {
  max-width: 560px;
  margin: 0 auto 3rem;
  padding: 0 1rem;
  position: relative;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box:focus-within {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.08);
}

.search-icon {
  color: var(--muted);
  flex-shrink: 0;
  font-size: 1rem;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}

.search-input::placeholder { color: var(--muted); }

.search-kbd {
  font-size: 0.7rem;
  color: var(--muted);
  background: var(--border);
  border-radius: 5px;
  padding: 0.15rem 0.45rem;
  font-family: monospace;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.search-box:focus-within .search-kbd { opacity: 0; pointer-events: none; }

.search-clear {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  line-height: 1;
  display: none;
  flex-shrink: 0;
  transition: color 0.15s;
}
.search-clear:hover { color: var(--text); }
.search-clear.visible { display: block; }

.no-results {
  display: none;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 2rem 0;
}
.no-results.visible { display: block; }

/* card hide/show during search */
.card { transition: opacity 0.2s, transform 0.2s, box-shadow 0.15s, border-color 0.15s; }
.card.hidden { opacity: 0; pointer-events: none; transform: scale(0.97); height: 0; padding: 0; margin: 0; overflow: hidden; border: none; }
.section.empty { display: none; }

/* ── Sections ── */
main { flex: 1; padding: 0 1rem 4rem; }

.section {
  max-width: 960px;
  margin: 0 auto 3rem;
}

.section-label, h2.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-amber);
}

/* ── App brand colours ── */
.card-finance { --card-accent: #6366f1; --card-accent-hover: #4f46e5; --card-glow: rgba(99,102,241,0.15); }

/* ── Cards ── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.card:hover {
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
  border-color: #333333;
}

.card-branded:hover {
  border-color: var(--card-accent);
  box-shadow: 0 4px 24px var(--card-glow);
}

.card-branded .btn-primary {
  background: var(--card-accent);
}
.card[class*="card-"] .btn-primary:hover {
  background: var(--card-accent-hover);
}
.card-branded .badge-live {
  background: color-mix(in srgb, var(--card-accent) 15%, transparent);
  color: var(--card-accent);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-icon-wrap {
  display: flex;
  align-items: center;
}

.card-icon-img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: contain;
}

.card-icon-initial {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--border);
  color: var(--muted);
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}


.badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-live { background: rgba(74, 222, 128, 0.12); color: var(--badge-live); }
.badge-soon { background: rgba(251, 191, 36, 0.12); color: var(--badge-soon); }

.card-branded h2, .card-branded h3 {
  color: var(--card-accent);
}

.card h2, .card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}

.card-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.card-features li {
  font-size: 0.82rem;
  color: var(--muted);
  padding-left: 1.1rem;
  position: relative;
  line-height: 1.4;
}

.card-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--badge-live);
  font-size: 0.75rem;
  top: 0.05em;
}

.card-branded .card-features li::before {
  color: var(--card-accent);
}

.card-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.card-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.free-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--card-accent, var(--accent));
  opacity: 0.75;
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-outline:hover { background: rgba(167, 139, 250, 0.1); }

.btn-disabled {
  background: var(--border);
  color: var(--muted);
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Trust strip ── */
.trust-strip {
  max-width: 960px;
  margin: 0 auto 3rem;
  border: 1px solid var(--border-amber);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1rem 1.5rem;
}

.trust-strip-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 0;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  padding: 0.25rem 0.75rem;
  white-space: nowrap;
}

.trust-icon { font-size: 0.9rem; }

.trust-divider {
  width: 1px;
  height: 14px;
  background: var(--border-amber);
}

@media (max-width: 640px) {
  .trust-strip { padding: 1rem; }
  .trust-divider { display: none; }
  .trust-strip-inner { justify-content: flex-start; gap: 0.25rem 0; }
  .trust-item { padding: 0.2rem 0.5rem; font-size: 0.75rem; }
}

/* ── Footer ── */
footer {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(245, 158, 11, 0.25);
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

footer a { color: var(--muted); text-decoration: none; }

/* ── Tablet (≤768px) ── */
@media (max-width: 768px) {
  header { padding: 0 1.25rem; }

  .hero { padding: 3.5rem 1.25rem 2.5rem; }

  /* 2-col grid on tablet if space allows, else single col */
  .cards { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

/* ── Mobile (≤480px) ── */
@media (max-width: 480px) {
  header {
    padding: 0 1rem;
    height: 52px;
  }

  /* Stack logo and nav vertically if nav overflows — prevent overlap */
  .logo { font-size: 1rem; }

  nav a {
    margin-left: 1rem;
    font-size: 0.82rem;
  }

  .hero {
    padding: 2.5rem 1rem 2rem;
  }

  /* Single column cards on mobile */
  .cards { grid-template-columns: 1fr; }

  /* Full-width buttons on mobile */
  .card-footer-row { flex-direction: column; align-items: flex-start; }
  .card-actions { flex-direction: column; width: 100%; }
  .btn { justify-content: center; width: 100%; }

  /* Slightly tighter card padding */
  .card { padding: 1.25rem; }

  /* Shrink section padding */
  main { padding: 0 1rem 3rem; }

  footer { padding: 1.25rem 1rem; }
}
