/* 简序 · Simple Apps — monochrome, light-first with dark toggle.
   Palette references the Timer app's theme tokens, stripped of hue. */
:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --card-alt: #eceef3;
  --border: #e3e6ec;
  --border-strong: #d3d8e0;
  --fg: #1a1d26;
  --secondary: #4e5464;
  --muted: #8a90a0;
  --shadow-sm: 0 1px 2px rgba(16,18,26,.05);
  --shadow-lg: 0 1px 2px rgba(16,18,26,.04), 0 18px 40px -20px rgba(16,18,26,.28);
}
html.dark {
  --bg: #0f0f14;
  --card: #1a1a24;
  --card-alt: #242434;
  --border: #282836;
  --border-strong: #363648;
  --fg: #e2e7f0;
  --secondary: #a8b0c4;
  --muted: #6b6b80;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow-lg: 0 1px 2px rgba(0,0,0,.3), 0 20px 44px -20px rgba(0,0,0,.7);
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  transition: background .3s ease, color .3s ease;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.15rem 2rem;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--fg);
}
.brand img { width: 34px; height: 34px; border-radius: 9px; display: block; }
.brand .wordmark { display: flex; flex-direction: column; line-height: 1.05; }
.brand .brand-name { font-size: 1.15rem; font-weight: 800; letter-spacing: 0.01em; }
:root[data-lang="zh"] .brand .brand-name { letter-spacing: 0.04em; }

.nav-actions { display: flex; align-items: center; gap: 0.5rem; }

.icon-btn, .lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 38px;
  padding: 0 0.7rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--secondary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.icon-btn { width: 38px; padding: 0; justify-content: center; }
.icon-btn:hover, .lang-btn:hover { border-color: var(--border-strong); color: var(--fg); }
.icon-btn svg, .lang-btn svg { width: 17px; height: 17px; }

/* sun/moon swap */
html:not(.dark) .icon-btn .moon { display: none; }
html.dark .icon-btn .sun { display: none; }

/* ---------- Layout ---------- */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 3.5rem 2rem 6rem;
}

header {
  text-align: center;
  margin: 2.5rem 0 4rem;
  animation: rise .7s ease-out backwards;
}

.badge {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  background: var(--card-alt);
  border: 1px solid var(--border);
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 1.5rem;
}

h1 {
  font-size: 3.4rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin-bottom: 1.25rem;
}

p.subtitle {
  font-size: 1.15rem;
  color: var(--secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ---------- Grid & cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}

.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), border-color .3s ease, box-shadow .35s ease;
  animation: rise .7s ease-out backwards;
}
.card.active-app:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}

.card-content { flex: 1; }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.4rem;
}

.card-icon {
  width: 3.4rem;
  height: 3.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  background: var(--card-alt);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.28rem 0.6rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.status .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--fg);
}
.status.live .dot { animation: pulse 2s infinite; }
.status.building { border-style: dashed; color: var(--muted); }
.status.building .dot { background: var(--muted); }
.status.testing { color: var(--secondary); }
.status.testing .dot { animation: pulse 2s infinite; }

.card h2 { font-size: 1.35rem; font-weight: 700; margin-bottom: 0.6rem; letter-spacing: -0.01em; }
.card p { color: var(--secondary); font-size: 0.93rem; margin-bottom: 1.75rem; }

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
  color: var(--secondary);
  font-weight: 600;
  font-size: 0.88rem;
  transition: color .3s ease;
}
.card-footer svg { width: 18px; height: 18px; transition: transform .3s ease; }
.card.active-app:hover .card-footer { color: var(--fg); }
.card.active-app:hover .card-footer svg { transform: translateX(4px); }

.upcoming-app { border-style: dashed; opacity: .85; cursor: default; }

/* ---------- Footer ---------- */
.site-footer {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2.5rem 2rem 3.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}
.site-footer .tagline { color: var(--secondary); font-weight: 600; margin-bottom: 0.4rem; }

/* ---------- Motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

@media (max-width: 600px) {
  h1 { font-size: 2.4rem; }
  .nav, .container { padding-left: 1.25rem; padding-right: 1.25rem; }
  .container { padding-top: 2rem; }
}
