/* ── DF App Library — Design System ───────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── Tokens ─────────────────────────────────────────────────────── */
:root {
  --bg:           #060d1f;
  --bg-surface:   #0b1530;
  --bg-card:      rgba(255 255 255 / 0.04);
  --bg-card-hover:rgba(255 255 255 / 0.08);
  --border:       rgba(255 255 255 / 0.07);
  --border-hover: rgba(240 165 0 / 0.35);

  --gold:         #f0a500;
  --gold-dim:     rgba(240 165 0 / 0.18);
  --gold-glow:    rgba(240 165 0 / 0.12);
  --blue:         #3a7bd5;
  --blue-dim:     rgba(58 123 213 / 0.18);
  --blue-glow:    rgba(58 123 213 / 0.12);

  --text-primary:   #f0f4ff;
  --text-secondary: #8899bb;
  --text-muted:     #4a5a7a;

  --radius-card: 16px;
  --radius-badge: 6px;
  --radius-pill:  999px;

  --shadow-card:  0 4px 24px rgba(0 0 0 / 0.4);
  --shadow-hover: 0 8px 40px rgba(0 0 0 / 0.55), 0 0 0 1px rgba(240 165 0 / 0.2);

  --nav-h: 64px;
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Particle canvas ─────────────────────────────────────────────── */
#particles-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ── Page wrap ───────────────────────────────────────────────────── */
.page-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Navigation ──────────────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 clamp(20px, 5vw, 56px);
  background: rgba(6 13 31 / 0.82);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);          /* white-to-navy on dark bg */
  opacity: 0.92;
  flex-shrink: 0;
}

.nav-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  white-space: nowrap;
}

.nav-subtitle {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-spacer { flex: 1; }

.nav-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold);
  background: var(--gold-dim);
  border: 1px solid rgba(240 165 0 / 0.3);
  border-radius: var(--radius-pill);
  padding: 5px 13px;
  letter-spacing: 0.03em;
}

.nav-badge-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.75); }
}

/* ── Hero ────────────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: clamp(56px, 9vw, 100px) clamp(20px, 5vw, 56px) clamp(20px, 3vw, 36px);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: rgba(255 255 255 / 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 7px 18px;
  margin-bottom: 28px;
}

.hero-title {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, #f0a500 0%, #ffe380 45%, #3a7bd5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  max-width: 560px;
  margin: 0 auto;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ── App grid section ────────────────────────────────────────────── */
.app-grid-section {
  flex: 1;
  padding: 0 clamp(20px, 5vw, 56px) 80px;
}

.section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
  padding-left: 2px;
}

#app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* ── App Card ────────────────────────────────────────────────────── */
.app-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    border-color var(--transition),
    background var(--transition);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
  cursor: pointer;
}

.app-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-card);
  background: linear-gradient(135deg, rgba(240 165 0 / 0.06) 0%, rgba(58 123 213 / 0.04) 100%);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.app-card:hover,
.app-card:focus-visible {
  transform: translateY(-4px) scale(1.005);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
  background: var(--bg-card-hover);
}

.app-card:hover::before,
.app-card:focus-visible::before {
  opacity: 1;
}

.app-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Card icon strip */
.card-icon-wrap {
  width: 100%;
  height: 160px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(58 123 213 / 0.18) 0%, transparent 65%),
    radial-gradient(ellipse at 75% 65%, rgba(240 165 0 / 0.12) 0%, transparent 60%),
    linear-gradient(160deg, rgba(11 21 48 / 0.9), rgba(6 13 31 / 0.95));
  border-bottom: 1px solid var(--border);
}

.card-icon-wrap img {
  width: 108px;
  height: 108px;
  object-fit: contain;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0 0 0 / 0.5), 0 0 0 1px rgba(255 255 255 / 0.06);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
}

.app-card:hover .card-icon-wrap img {
  transform: scale(1.08) translateY(-3px);
  box-shadow: 0 14px 40px rgba(0 0 0 / 0.55), 0 0 0 1px rgba(240 165 0 / 0.15);
}

/* Card body */
.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px 20px 20px;
  gap: 8px;
}

.card-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.card-desc {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.55;
  flex: 1;
}

/* Card footer */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: rgba(0 0 0 / 0.12);
}

.badge-login {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gold);
  background: var(--gold-dim);
  border: 1px solid rgba(240 165 0 / 0.25);
  border-radius: var(--radius-badge);
  padding: 3px 9px;
  white-space: nowrap;
}

.badge-login svg {
  width: 10px; height: 10px;
  fill: currentColor;
  opacity: 0.85;
}

.badge-soon {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: rgba(255 255 255 / 0.05);
  border: 1px solid rgba(255 255 255 / 0.1);
  border-radius: var(--radius-badge);
  padding: 3px 9px;
  white-space: nowrap;
}

/* New card indicator ribbon */
.card-ribbon {
  position: absolute;
  top: 10px;
  right: -24px;
  background: var(--gold);
  color: #000;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 32px;
  transform: rotate(35deg);
  transform-origin: center;
  z-index: 2;
  pointer-events: none;
}

/* ── "Coming Soon" card variant ──────────────────────────────────── */
.app-card.coming-soon {
  opacity: 0.6;
  cursor: default;
  pointer-events: none;
}

.app-card.coming-soon .card-icon-wrap {
  filter: grayscale(0.5);
}

/* ── Footer ───────────────────────────────────────────────────────── */
.site-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px clamp(20px, 5vw, 56px);
  border-top: 1px solid var(--border);
  background: rgba(0 0 0 / 0.2);
}

.footer-logo {
  height: 28px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.35;
  flex-shrink: 0;
}

.footer-text {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.footer-spacer { flex: 1; }

.footer-link {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-link:hover { color: var(--text-primary); }

.footer-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 540px) {
  .nav-subtitle { display: none; }
  .stats-row { gap: 28px; }
  #app-grid { grid-template-columns: 1fr; }
}
