/* Lodestone hubs: a calm "desktop" of apps. */
:root {
  --ink: #f4f6fb;
  --muted: rgba(244, 246, 251, 0.72);
  --glass: rgba(255, 255, 255, 0.10);
  --glass-edge: rgba(255, 255, 255, 0.18);
  --accent: #7cc4ff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #0b1530;
  overflow-x: hidden;
}

/* Wallpaper: soft blobs of colour, a different mood for each hub. */
.wallpaper {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60vw 60vw at 12% 18%, var(--w1), transparent 60%),
    radial-gradient(55vw 55vw at 88% 22%, var(--w2), transparent 62%),
    radial-gradient(70vw 70vw at 55% 105%, var(--w3), transparent 60%),
    linear-gradient(160deg, var(--w0a), var(--w0b));
}
.wallpaper::after {
  /* A faint grain so the gradients don't band. */
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: radial-gradient(rgba(255,255,255,0.8) 0.6px, transparent 0.6px);
  background-size: 3px 3px;
}
body.home { --w0a: #0d1b3d; --w0b: #0a2a3a; --w1: #2f5bd8aa; --w2: #18a6a088; --w3: #6b46c188; --accent: #8fd3ff; }
body.finance { --w0a: #0a2219; --w0b: #10202f; --w1: #1f9d6baa; --w2: #c9a22788; --w3: #1d4ed888; --accent: #9be7c4; }

/* Top bar */
.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  background: rgba(8, 14, 30, 0.35);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--glass-edge);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 0.02em; color: var(--ink); text-decoration: none; }
.brand svg { width: 26px; height: 26px; }
.switcher {
  display: flex;
  padding: 4px;
  gap: 4px;
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  border-radius: 999px;
}
.switcher a {
  padding: 7px 16px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: background 0.2s, color 0.2s;
}
.switcher a svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.switcher a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.08); }
.switcher a[aria-current="page"] { background: var(--ink); color: #0b1530; }
.clock { justify-self: end; text-align: right; font-variant-numeric: tabular-nums; }
.clock .time { font-weight: 700; font-size: 15px; }
.clock .date { font-size: 12px; color: var(--muted); }

main {
  flex: 1;
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: 56px 24px 140px;
}
.hello h1 { margin: 0; font-size: clamp(30px, 5vw, 46px); font-weight: 800; letter-spacing: -0.02em; }
.hello p { margin: 8px 0 0; color: var(--muted); font-size: 17px; }

/* The app grid */
.apps {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 30px 18px;
}
.app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  text-align: center;
  border-radius: 18px;
  padding: 8px 4px;
  outline: none;
}
.icon {
  width: 84px;
  height: 84px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  overflow: hidden;
}
.icon img { width: 100%; height: 100%; }
.icon svg { width: 42px; height: 42px; stroke: #fff; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app .name { font-weight: 600; font-size: 14px; line-height: 1.2; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35); }
.app .what { font-size: 12px; color: var(--muted); line-height: 1.3; max-width: 140px; }
a.app:hover .icon, a.app:focus-visible .icon { transform: translateY(-4px) scale(1.04); box-shadow: 0 16px 34px rgba(0, 0, 0, 0.45), 0 0 0 3px var(--accent); }
a.app:active .icon { transform: scale(0.96); }

/* Coming soon: frosted and quiet. */
.app.soon { cursor: default; }
.app.soon .icon { filter: saturate(0.55) brightness(0.9); opacity: 0.78; }
.badge {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  white-space: nowrap;
}

/* Gradients for placeholder icons */
.g-blue { background: linear-gradient(145deg, #4f8cff, #2b55d6); }
.g-teal { background: linear-gradient(145deg, #2bc4b4, #148a86); }
.g-green { background: linear-gradient(145deg, #4cc27a, #1f8a4c); }
.g-amber { background: linear-gradient(145deg, #f5b84a, #d98a1f); }
.g-pink { background: linear-gradient(145deg, #f07aa7, #c2477a); }
.g-purple { background: linear-gradient(145deg, #9b7bf0, #6747c9); }
.g-slate { background: linear-gradient(145deg, #7d8aa3, #4a5568); }
.g-gold { background: linear-gradient(145deg, #e9c46a, #b98a1e); }
.g-emerald { background: linear-gradient(145deg, #34d399, #059669); }
.g-red { background: linear-gradient(145deg, #f87171, #c03535); }

/* The dock */
.dock-wrap { position: fixed; left: 0; right: 0; bottom: 16px; display: flex; justify-content: center; pointer-events: none; z-index: 10; }
.dock {
  pointer-events: auto;
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid var(--glass-edge);
  border-radius: 24px;
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}
.dock a { position: relative; display: block; text-decoration: none; }
.dock .icon { width: 52px; height: 52px; border-radius: 15px; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3); }
.dock .icon svg { width: 26px; height: 26px; }
.dock a:hover .icon { transform: translateY(-6px) scale(1.1); }
.dock a .tip {
  position: absolute;
  bottom: 64px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 16, 32, 0.85);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.dock a:hover .tip, .dock a:focus-visible .tip { opacity: 1; }
.dock a[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--ink);
}
.dock .sep { width: 1px; background: var(--glass-edge); margin: 4px 2px; }

footer { text-align: center; color: var(--muted); font-size: 12px; padding: 0 0 96px; }
footer a { color: var(--muted); }

@media (max-width: 640px) {
  .bar { grid-template-columns: auto 1fr; }
  .clock { display: none; }
  .switcher { justify-self: end; }
  .switcher a { padding: 7px 12px; }
  .switcher a span { display: none; }
  main { padding-top: 36px; }
  .apps { grid-template-columns: repeat(4, 1fr); gap: 22px 8px; }
  .icon { width: 64px; height: 64px; border-radius: 17px; }
  .icon svg { width: 32px; height: 32px; }
  .app .what { display: none; }
  .app .name { font-size: 12px; }
  .badge { font-size: 8px; padding: 2px 6px; bottom: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
