/* =====================================================================
   AppCraft Digital — shared stylesheet
   Used by index.html and every /<app>/ landing page so they stay lean,
   consistent, and fast to crawl. Page-specific tweaks live in <style>
   blocks on the pages that need them.
   ===================================================================== */

:root {
  color-scheme: light dark;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --bg: #f6f7fb;
  --bg-elev: #ffffff;
  --bg-soft: #eef0f6;
  --text: #0f1220;
  --text-soft: #525a72;
  --text-mute: #818aa3;
  --border: #e2e5ee;
  --brand: #4f46e5;
  --brand-2: #7c3aed;
  --brand-3: #ec4899;
  --accent: #06b6d4;
  --ok: #10b981;
  --warn: #f59e0b;
  --shadow: 0 1px 2px rgba(15, 18, 32, 0.04), 0 8px 24px rgba(15, 18, 32, 0.06);
  --shadow-lg: 0 20px 60px rgba(15, 18, 32, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0b10;
    --bg-elev: #13151d;
    --bg-soft: #1a1d28;
    --text: #f4f6fb;
    --text-soft: #b9c0d4;
    --text-mute: #7d8499;
    --border: #252a37;
    --brand: #818cf8;
    --brand-2: #a78bfa;
    --brand-3: #f472b6;
    --accent: #22d3ee;
    --ok: #34d399;
    --warn: #fbbf24;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: var(--brand); }

.wrap {
  width: min(100% - 48px, 1120px);
  margin-inline: auto;
}

/* ---------- Background flourish ---------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.aurora::before,
.aurora::after {
  content: "";
  position: absolute;
  width: 60vw;
  height: 60vw;
  max-width: 720px;
  max-height: 720px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  animation: drift 18s ease-in-out infinite alternate;
}
.aurora::before {
  top: -15%;
  left: -10%;
  background: radial-gradient(circle at 30% 30%, var(--brand), transparent 70%);
}
.aurora::after {
  bottom: -20%;
  right: -10%;
  background: radial-gradient(circle at 70% 70%, var(--brand-3), transparent 70%);
  animation-delay: -6s;
}
@media (prefers-color-scheme: dark) {
  .aurora::before, .aurora::after { opacity: 0.32; }
}
@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(6%, 4%) scale(1.12); }
}

/* ---------- Header ---------- */
header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}
.logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-3));
  display: grid;
  place-items: center;
  color: #fff;
  flex: none;
}
.brand small {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-mute);
  letter-spacing: 0.02em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-links a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 10px;
  transition: color .15s ease, background .15s ease;
}
.nav-links a:hover { color: var(--text); background: var(--bg-soft); }

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 56px;
  text-align: center;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-soft);
  box-shadow: var(--shadow);
  margin-bottom: 26px;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); }
  70%  { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
h1 {
  margin: 0 auto;
  max-width: 18ch;
  font-size: clamp(2.4rem, 6.4vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 800;
}
h1 .grad {
  background: linear-gradient(120deg, var(--brand), var(--brand-2) 45%, var(--brand-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  margin: 22px auto 0;
  max-width: 60ch;
  font-size: clamp(1.02rem, 2.2vw, 1.22rem);
  color: var(--text-soft);
}
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 34px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  cursor: pointer;
}
.btn-primary {
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: 0 10px 30px color-mix(in srgb, var(--brand) 40%, transparent);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px color-mix(in srgb, var(--brand) 50%, transparent); }
.btn-ghost {
  background: var(--bg-elev);
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--brand); }

/* ---------- Stats strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 56px auto 0;
  max-width: 640px;
}
.stat {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat b {
  display: block;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--brand), var(--brand-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat span { font-size: 0.8rem; color: var(--text-mute); font-weight: 600; }

/* ---------- Section ---------- */
section { padding: 72px 0; }
.sec-head { text-align: center; max-width: 60ch; margin: 0 auto 48px; }
.sec-head h2 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
  font-weight: 800;
}
.sec-head p { margin: 0; color: var(--text-soft); font-size: 1.05rem; }

/* ---------- App cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}
.card {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-3));
  opacity: 0;
  transition: opacity .2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
}
.card:hover::before { opacity: 1; }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.app-icon {
  width: 58px; height: 58px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  flex: none;
  background: var(--bg-soft);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.app-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Legacy gradient fallbacks (kept for any remaining SVG icons) */
.icon-lock   { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.icon-scan   { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.icon-vault  { background: linear-gradient(135deg, #ec4899, #f59e0b); }
.icon-speed  { background: linear-gradient(135deg, #10b981, #06b6d4); }

.badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge-live {
  color: var(--ok);
  background: color-mix(in srgb, var(--ok) 16%, transparent);
}
.badge-soon {
  color: var(--warn);
  background: color-mix(in srgb, var(--warn) 16%, transparent);
}

.card h3 {
  margin: 0 0 6px;
  font-size: 1.32rem;
  letter-spacing: -0.01em;
}
.card p.desc {
  margin: 0 0 18px;
  color: var(--text-soft);
  font-size: 0.96rem;
  min-height: 4.2em;
}
.features {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  display: grid;
  gap: 8px;
}
.features li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 0.9rem;
  color: var(--text-soft);
}
.check {
  flex: none;
  width: 18px; height: 18px;
  margin-top: 1px;
  color: var(--ok);
}
.card .btn { width: 100%; justify-content: center; }
.card.disabled .btn {
  cursor: not-allowed;
  opacity: 0.85;
}

/* ---------- Values ---------- */
.values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
}
.value {
  text-align: center;
  padding: 30px 22px;
  border-radius: var(--radius);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.value .vicon {
  width: 52px; height: 52px;
  margin: 0 auto 16px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  color: var(--brand);
}
.value h4 { margin: 0 0 8px; font-size: 1.08rem; }
.value p { margin: 0; color: var(--text-soft); font-size: 0.92rem; }

/* ---------- Footer ---------- */
footer.site {
  border-top: 1px solid var(--border);
  padding: 48px 0 60px;
  margin-top: 40px;
  background: var(--bg-soft);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(auto-fit, minmax(150px, 1fr));
  gap: 32px;
}
.foot-grid p { color: var(--text-soft); font-size: 0.92rem; max-width: 38ch; }
.foot-col h5 {
  margin: 0 0 12px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-mute);
}
.foot-col a {
  display: block;
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.92rem;
  padding: 5px 0;
  transition: color .15s ease;
}
.foot-col a:hover { color: var(--brand); }
.foot-bottom {
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--text-mute);
  font-size: 0.86rem;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .aurora::before, .aurora::after, .dot { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .hero { padding: 64px 0 40px; }
  .stats { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  section { padding: 56px 0; }
}

/* =====================================================================
   App detail page layout (used by /<app>/ landing pages)
   ===================================================================== */

/* Breadcrumb */
.breadcrumb {
  font-size: 0.86rem;
  color: var(--text-mute);
  padding: 18px 0 0;
}
.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.breadcrumb li { display: flex; align-items: center; gap: 6px; }
.breadcrumb li::after { content: "›"; opacity: 0.5; }
.breadcrumb li:last-child::after { content: ""; }
.breadcrumb a { color: var(--text-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb [aria-current="page"] { color: var(--text); font-weight: 600; }

/* App hero block */
.app-hero {
  padding: 28px 0 8px;
}
.app-hero .hero-row {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.app-hero .app-icon {
  width: 88px; height: 88px;
  border-radius: 22px;
}
.app-hero .app-icon svg { width: 42px; height: 42px; }
.app-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  max-width: none;
  margin: 0 0 6px;
}
.app-hero .tagline {
  color: var(--text-soft);
  font-size: 1.1rem;
  margin: 0;
}

/* Two-column detail layout */
.detail {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 40px;
  align-items: start;
}
.detail .prose h2 {
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  margin: 36px 0 12px;
}
.detail .prose h2:first-child { margin-top: 0; }
.detail .prose h3 {
  font-size: 1.12rem;
  margin: 22px 0 8px;
}
.detail .prose p {
  color: var(--text-soft);
  margin: 0 0 14px;
}
.detail .prose ul {
  color: var(--text-soft);
  margin: 0 0 16px;
  padding-left: 1.2em;
}
.detail .prose ul li { margin-bottom: 8px; }
.detail .prose ul li b { color: var(--text); }

/* Sticky info card */
.info-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 88px;
}
.info-card h3 {
  margin: 0 0 16px;
  font-size: 1.05rem;
}
.info-card dl {
  margin: 0;
  display: grid;
  gap: 12px;
}
.info-card dt {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-mute);
  font-weight: 700;
}
.info-card dd {
  margin: 2px 0 0;
  font-size: 0.94rem;
  color: var(--text);
}
.info-card .btn { width: 100%; justify-content: center; margin-top: 18px; }

/* Use-cases / who-it's-for chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 4px;
}
.chip {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text-soft);
  border: 1px solid var(--border);
}

/* FAQ accordion */
.faq {
  display: grid;
  gap: 12px;
}
.faq details {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 18px;
  box-shadow: var(--shadow);
}
.faq details[open] {
  border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
}
.faq summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 1.02rem;
  padding: 14px 0;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--brand);
  transition: transform .2s ease;
}
.faq details[open] summary::after { content: "−"; }
.faq details p {
  margin: 0 0 16px;
  color: var(--text-soft);
}

/* "Other apps" cross-link strip on detail pages */
.related {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.related a {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  transition: border-color .15s ease, transform .15s ease;
}
.related a:hover { border-color: var(--brand); transform: translateY(-2px); }
.related .app-icon { width: 38px; height: 38px; border-radius: 10px; }
.related .app-icon svg { width: 20px; height: 20px; }
.related b { display: block; font-size: 0.94rem; }
.related small { color: var(--text-mute); font-size: 0.8rem; }

@media (max-width: 860px) {
  .detail { grid-template-columns: 1fr; }
  .info-card { position: static; }
}
