:root {
  --bg: #f7f7fb;
  --surface: rgba(255, 255, 255, .78);
  --surface-solid: #ffffff;
  --text: #0f1222;
  --muted: #5a6078;
  --border: rgba(15, 18, 34, .08);
  --ring: rgba(99, 102, 241, .55);
  --shadow: 0 1px 2px rgba(15, 18, 34, .04), 0 8px 24px -8px rgba(15, 18, 34, .10);
  --shadow-hover: 0 2px 6px rgba(15, 18, 34, .06), 0 30px 60px -20px rgba(15, 18, 34, .28);
  --blob-opacity: .45;
  --grid-line: rgba(15, 18, 34, .045);
  --phone-frame: #11131c;

  --concept-bg: rgba(100, 116, 139, .14); --concept-fg: #475569;
  --dev-bg: rgba(245, 158, 11, .16);      --dev-fg: #a3530a;
  --live-bg: rgba(16, 185, 129, .15);     --live-fg: #047857;
  --soon-bg: rgba(99, 102, 241, .12);     --soon-fg: #4f46e5;

  --radius: 24px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0b14;
    --surface: rgba(22, 24, 38, .72);
    --surface-solid: #161826;
    --text: #eef0f8;
    --muted: #9ba1b9;
    --border: rgba(255, 255, 255, .08);
    --ring: rgba(165, 180, 252, .7);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px -12px rgba(0, 0, 0, .6);
    --shadow-hover: 0 2px 8px rgba(0, 0, 0, .5), 0 40px 80px -24px rgba(0, 0, 0, .85);
    --blob-opacity: .32;
    --grid-line: rgba(255, 255, 255, .035);
    --phone-frame: #050609;

    --concept-bg: rgba(148, 163, 184, .14); --concept-fg: #cbd5e1;
    --dev-bg: rgba(251, 191, 36, .14);      --dev-fg: #fcd34d;
    --live-bg: rgba(52, 211, 153, .14);     --live-fg: #6ee7b7;
    --soon-bg: rgba(165, 180, 252, .14);    --soon-fg: #c7d2fe;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

.container {
  position: relative;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Animated backdrop ---------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  width: 46vmax;
  height: 46vmax;
  border-radius: 50%;
  filter: blur(80px);
  opacity: var(--blob-opacity);
  will-change: transform;
}
.blob-1 { background: #6366f1; top: -18vmax; left: -10vmax; animation: drift-1 26s var(--ease) infinite alternate; }
.blob-2 { background: #ec4899; top: -12vmax; right: -14vmax; animation: drift-2 32s var(--ease) infinite alternate; }
.blob-3 { background: #14b8a6; top: 30vmax; left: 30vw; width: 36vmax; height: 36vmax; opacity: calc(var(--blob-opacity) * .7); animation: drift-3 38s var(--ease) infinite alternate; }

@keyframes drift-1 { to { transform: translate(12vmax, 8vmax) scale(1.15); } }
@keyframes drift-2 { to { transform: translate(-10vmax, 12vmax) scale(.9); } }
@keyframes drift-3 { to { transform: translate(-14vmax, -6vmax) scale(1.2); } }

.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}

/* ---------- Hero ---------- */

.hero {
  padding: 1.5rem 0 3.5rem;
  text-align: center;
}

.brand {
  display: flex;
  width: max-content;
  align-items: center;
  gap: .55rem;
  margin: 0 auto clamp(3rem, 9vw, 6rem);
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -.01em;
  text-decoration: none;
}
.brand img { border-radius: 8px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 1.25rem;
  padding: .35rem .9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--muted);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, .6);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse { 70%, 100% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); } }

.hero h1 {
  margin: 0;
  font-size: clamp(2.75rem, 8vw, 5.25rem);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1;
}

.gradient-text {
  background: linear-gradient(120deg, #6366f1 0%, #a855f7 45%, #ec4899 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  margin: 1.4rem auto 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  line-height: 1.55;
}

.stats {
  display: flex;
  justify-content: center;
  gap: .6rem;
  flex-wrap: wrap;
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 500;
}
.stats[hidden] { display: none; }
.stats span {
  padding: .3rem .85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}
.stats strong { color: var(--text); font-weight: 700; }

/* ---------- Grid & cards ---------- */

main { flex: 1; padding-bottom: 6rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: 1.75rem;
}

.card {
  --accent: #6366f1;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: inherit;
  text-decoration: none;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .45s var(--ease);
  opacity: 0;
  animation: rise .7s var(--ease) forwards;
  animation-delay: calc(var(--i, 0) * 80ms);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.card.is-link { cursor: pointer; }
.card.is-link:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}
.card.is-link:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 4px;
}

/* Preview area with phone mockup */

.preview {
  position: relative;
  height: 250px;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--accent) 38%, transparent), transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 14%, transparent), transparent);
  border-bottom: 1px solid var(--border);
}

.preview::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 56px;
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--surface-solid) 70%, transparent));
  pointer-events: none;
}

.phone {
  position: absolute;
  left: 50%;
  top: 30px;
  width: 172px;
  aspect-ratio: 172 / 300;
  padding: 6px;
  border-radius: 30px;
  background: var(--phone-frame);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .08) inset,
    0 30px 50px -18px color-mix(in srgb, var(--accent) 60%, rgba(0, 0, 0, .6));
  transform: translateX(-50%);
  transition: transform .6s var(--ease);
}
.phone::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 2;
  width: 52px;
  height: 14px;
  border-radius: 10px;
  background: var(--phone-frame);
  transform: translateX(-50%);
}

.screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
}
.screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform .8s var(--ease);
}

.card.is-link:hover .phone { transform: translateX(-50%) translateY(-12px) rotate(-1.5deg); }
.card.is-link:hover .screen img { transform: scale(1.06); }

/* Placeholder screen for apps without a site */

.placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .9rem;
  height: 100%;
  padding: 44px 16px 16px;
  background:
    radial-gradient(90% 60% at 50% 20%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 70%),
    linear-gradient(180deg, #151829, #0b0c16);
  color: rgba(255, 255, 255, .85);
}
.placeholder img {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  box-shadow: 0 10px 28px -6px color-mix(in srgb, var(--accent) 70%, transparent);
  animation: float 5s ease-in-out infinite;
}
.placeholder .ph-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.5;
  opacity: .75;
}
.placeholder .ph-bar {
  width: 100%;
  height: 26px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .06);
}
.placeholder .ph-bar.short { width: 70%; }
.placeholder .ph-bar.tall { height: 60px; }

@keyframes float { 50% { transform: translateY(-6px); } }

/* Card body */

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: .9rem;
  padding: 1.4rem 1.5rem 1.5rem;
}

.card-head {
  display: flex;
  align-items: center;
  gap: .9rem;
}

.app-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 65%, rgba(0, 0, 0, .4)), 0 0 0 1px var(--border);
  transition: transform .45s var(--ease);
}
.card.is-link:hover .app-icon { transform: scale(1.08) rotate(-4deg); }

.card h2 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.2;
}

.app-tagline {
  margin: .15rem 0 0;
  color: color-mix(in srgb, var(--accent) 75%, var(--text));
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.35;
}

.description {
  margin: 0;
  flex: 1;
  color: var(--muted);
  font-size: .97rem;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
  padding-top: .9rem;
  border-top: 1px solid var(--border);
}

.badges { display: flex; gap: .45rem; flex-wrap: wrap; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .28rem .7rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  white-space: nowrap;
  background: var(--concept-bg);
  color: var(--concept-fg);
}
.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge.status-in-development { background: var(--dev-bg); color: var(--dev-fg); }
.badge.status-live { background: var(--live-bg); color: var(--live-fg); }
.badge.status-live::before { box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 25%, transparent); }
.badge.soon { background: var(--soon-bg); color: var(--soon-fg); }
.badge.soon::before { display: none; }

.cta {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .45rem .95rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  box-shadow: 0 6px 16px -6px var(--accent);
  transition: gap .3s var(--ease), filter .3s var(--ease);
}
.cta svg { width: 14px; height: 14px; transition: transform .3s var(--ease); }
.card.is-link:hover .cta { filter: brightness(1.08); }
.card.is-link:hover .cta svg { transform: translate(2px, -2px); }

.message { grid-column: 1 / -1; text-align: center; color: var(--muted); }

/* ---------- Footer ---------- */

.site-footer {
  padding: 2.25rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: .92rem;
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--text); font-weight: 600; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }

a:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; border-radius: 6px; }

/* ---------- Responsive ---------- */

@media (max-width: 560px) {
  .hero { padding-bottom: 2.5rem; }
  .grid { gap: 1.25rem; }
  .preview { height: 220px; }
  .phone { width: 150px; top: 26px; }
  .card-body { padding: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .card { opacity: 1; }
  html { scroll-behavior: auto; }
}
