/* Landing page of the web app suite. The tokens below are the suite's shared ones (copied from
   ../Tilings/style.css, see ../WEBAPPS.md); the rest is this page's own layout. */
:root {
  --rosewater: #f5e0dc; --rosewater-rgb: 245 224 220;
  --flamingo: #f2cdcd; --flamingo-rgb: 242 205 205;
  --pink: #f5c2e7; --pink-rgb: 245 194 231;
  --mauve: #cba6f7; --mauve-rgb: 203 166 247;
  --red: #f38ba8; --red-rgb: 243 139 168;
  --maroon: #eba0ac; --maroon-rgb: 235 160 172;
  --peach: #fab387; --peach-rgb: 250 179 135;
  --yellow: #f9e2af; --yellow-rgb: 249 226 175;
  --green: #a6e3a1; --green-rgb: 166 227 161;
  --teal: #94e2d5; --teal-rgb: 148 226 213;
  --sky: #89dceb; --sky-rgb: 137 220 235;
  --sapphire: #74c7ec; --sapphire-rgb: 116 199 236;
  --blue: #89b4fa; --blue-rgb: 137 180 250;
  --lavender: #b4befe; --lavender-rgb: 180 190 254;
  --text: #cdd6f4; --text-rgb: 205 214 244;
  --subtext1: #bac2de; --subtext1-rgb: 186 194 222;
  --subtext0: #a6adc8; --subtext0-rgb: 166 173 200;
  --overlay2: #9399b2; --overlay2-rgb: 147 153 178;
  --overlay1: #7f849c; --overlay1-rgb: 127 132 156;
  --overlay0: #6c7086; --overlay0-rgb: 108 112 134;
  --surface2: #585b70; --surface2-rgb: 88 91 112;
  --surface1: #45475a; --surface1-rgb: 69 71 90;
  --surface0: #313244; --surface0-rgb: 49 50 68;
  --base: #1e1e2e; --base-rgb: 30 30 46;
  --mantle: #181825; --mantle-rgb: 24 24 37;
  --crust: #11111b; --crust-rgb: 17 17 27;
  --deep-rgb: 11 11 18; --shine-rgb: 255 255 255; --shadow-rgb: 17 17 27; --on-accent: #11111b;
  --glass: rgb(var(--base-rgb) / 0.52);
  --glass-strong: rgb(var(--mantle-rgb) / 0.72);
  --glass-card: rgb(var(--surface0-rgb) / 0.38);
  --glass-hover: rgb(var(--surface1-rgb) / 0.55);
  --edge: rgb(var(--text-rgb) / 0.10);
  --edge-strong: rgb(var(--text-rgb) / 0.18);
  --shine: inset 0 1px 0 rgb(var(--shine-rgb) / 0.06);
  --blur: blur(18px) saturate(150%);
  --radius: 16px;
  --topbar-h: 56px;
  --below-bar: 80px;
  --panel-w: 380px;

  --mono: ui-monospace, "JetBrains Mono", "Fira Code", "Cascadia Code", Menlo, Consolas, monospace;
  --sans: Inter, system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --rosewater: #dc8a78; --rosewater-rgb: 220 138 120;
  --flamingo: #dd7878; --flamingo-rgb: 221 120 120;
  --pink: #ea76cb; --pink-rgb: 234 118 203;
  --mauve: #8839ef; --mauve-rgb: 136 57 239;
  --red: #d20f39; --red-rgb: 210 15 57;
  --maroon: #e64553; --maroon-rgb: 230 69 83;
  --peach: #fe640b; --peach-rgb: 254 100 11;
  --yellow: #df8e1d; --yellow-rgb: 223 142 29;
  --green: #40a02b; --green-rgb: 64 160 43;
  --teal: #179299; --teal-rgb: 23 146 153;
  --sky: #04a5e5; --sky-rgb: 4 165 229;
  --sapphire: #209fb5; --sapphire-rgb: 32 159 181;
  --blue: #1e66f5; --blue-rgb: 30 102 245;
  --lavender: #7287fd; --lavender-rgb: 114 135 253;
  --text: #4c4f69; --text-rgb: 76 79 105;
  --subtext1: #5c5f77; --subtext1-rgb: 92 95 119;
  --subtext0: #6c6f85; --subtext0-rgb: 108 111 133;
  --overlay2: #7c7f93; --overlay2-rgb: 124 127 147;
  --overlay1: #8c8fa1; --overlay1-rgb: 140 143 161;
  --overlay0: #9ca0b0; --overlay0-rgb: 156 160 176;
  --surface2: #acb0be; --surface2-rgb: 172 176 190;
  --surface1: #bcc0cc; --surface1-rgb: 188 192 204;
  --surface0: #ccd0da; --surface0-rgb: 204 208 218;
  --base: #eff1f5; --base-rgb: 239 241 245;
  --mantle: #e6e9ef; --mantle-rgb: 230 233 239;
  --crust: #dce0e8; --crust-rgb: 220 224 232;
  --deep-rgb: 210 214 224; --shine-rgb: 255 255 255; --shadow-rgb: 76 79 105; --on-accent: #eff1f5;
  color-scheme: light;
  --glass: rgb(var(--base-rgb) / 0.62);
  --glass-strong: rgb(var(--base-rgb) / 0.82);
  --glass-card: rgb(var(--shine-rgb) / 0.45);
  --glass-hover: rgb(var(--surface0-rgb) / 0.7);
  --edge: rgb(var(--text-rgb) / 0.12);
  --edge-strong: rgb(var(--text-rgb) / 0.2);
  --shine: inset 0 1px 0 rgb(var(--shine-rgb) / 0.6);
}
:root { --info-w: 304px; }
@media (max-width: 1250px) { :root { --info-w: 260px; } }
.info-panel {
  position: absolute; top: var(--below-bar); left: 12px; width: var(--info-w); z-index: 2;
  max-height: calc(100% - var(--below-bar) - var(--title-h, 130px) - 24px); /* ends above the tiling's title panel (its height is measured) */
  overflow-y: auto; overflow-x: hidden; padding: 10px; display: flex; flex-direction: column; gap: 10px;
  border-radius: calc(var(--radius) + 4px); background: var(--glass); border: 1px solid var(--edge);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shine), 0 14px 50px rgb(var(--shadow-rgb) / 0.45);
  scrollbar-width: thin; scrollbar-color: var(--surface1) transparent;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font: 14px/1.45 var(--sans);
  color: var(--text);
  background: var(--crust);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
/* aurora backdrop that the glass blurs (as in the apps) */
body::before {
  content: '';
  position: fixed;
  inset: -20%;
  z-index: -1;
  background:
    radial-gradient(38% 42% at 18% 22%, rgb(var(--mauve-rgb) / 0.12), transparent 70%),
    radial-gradient(34% 38% at 78% 18%, rgb(var(--blue-rgb) / 0.09), transparent 70%),
    radial-gradient(40% 40% at 70% 82%, rgb(var(--pink-rgb) / 0.06), transparent 70%),
    radial-gradient(36% 40% at 22% 85%, rgb(var(--teal-rgb) / 0.06), transparent 70%),
    linear-gradient(160deg, var(--mantle) 0%, var(--crust) 60%, rgb(var(--deep-rgb)) 100%);
  animation: aurora 40s ease-in-out infinite alternate;
}
/* the apps' 30px dot grid */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgb(var(--text-rgb) / 0.07) 1px, transparent 1.5px);
  background-size: 30px 30px;
}
@keyframes aurora {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(3%, -2%) rotate(6deg); }
}
@media (prefers-reduced-motion: reduce) { body::before { animation: none; } }

.glass {
  background: var(--glass);
  border: 1px solid var(--edge);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}

/* ---------- top bar */
.topbar {
  position: sticky;
  top: 12px;
  margin: 12px 12px 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--topbar-h);
  padding: 9px 14px 9px 18px;
  border-radius: var(--radius);
  box-shadow: var(--shine), 0 10px 40px rgb(var(--shadow-rgb) / 0.45);
}
.brand { font-weight: 700; letter-spacing: 0.3px; font-size: 17px; white-space: nowrap; }
.logo { color: var(--mauve); text-shadow: 0 0 14px rgb(var(--mauve-rgb) / 0.8); }
.brand .logo { letter-spacing: 3px; }
button {
  font: inherit;
  color: inherit;
  border: 1px solid var(--edge);
  background: rgb(var(--surface0-rgb) / 0.25);
  border-radius: 10px;
  padding: 7px 12px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: var(--shine);
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
}
button:hover { border-color: rgb(var(--lavender-rgb) / 0.45); background: var(--glass-hover); box-shadow: var(--shine), 0 0 18px rgb(var(--lavender-rgb) / 0.12); }
.theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: inline; }
:root[data-theme="light"] .theme-toggle .moon { display: none; }
:focus-visible { outline: 2px solid var(--lavender); outline-offset: 2px; }

/* ---------- content */
main {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 72px 16px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero { text-align: center; margin-bottom: 40px; }
.hero h1 { margin: 0 0 10px; font-size: 34px; font-weight: 700; letter-spacing: -0.3px; }
.hero p { margin: 0 auto; max-width: 520px; color: var(--subtext0); font-size: 15px; }

.apps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.app {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 22px 20px;
  min-height: 260px;
  border-radius: calc(var(--radius) + 4px);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shine), 0 14px 50px rgb(var(--shadow-rgb) / 0.4);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.app:hover, .app:focus-visible {
  transform: translateY(-3px);
  border-color: rgb(var(--lavender-rgb) / 0.45);
  box-shadow: var(--shine), 0 18px 60px rgb(var(--shadow-rgb) / 0.5), 0 0 30px rgb(var(--lavender-rgb) / 0.14);
}
/* a faint drawing of what each app makes, behind the text */
.app .art {
  position: absolute;
  right: -18px; top: -14px;
  width: 190px; height: 190px;
  color: var(--mauve);
  opacity: 0.22;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.4s;
}
.app:hover .art { opacity: 0.34; transform: rotate(-4deg) scale(1.04); }
.app .logo { font-size: 34px; line-height: 1; margin-bottom: auto; }
.app h2 { margin: 56px 0 0; font-size: 19px; font-weight: 700; }
.app p { margin: 0; color: var(--subtext0); }
.app .open {
  margin-top: 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--lavender);
}
.app .open::after { content: ' →'; transition: margin 0.2s; }
.app:hover .open::after { margin-left: 4px; }

footer { text-align: center; padding: 0 16px 20px; color: var(--overlay1); font-size: 12px; }

@media (max-width: 760px) {
  main { padding-top: 40px; }
  .hero h1 { font-size: 27px; }
  .apps { grid-template-columns: 1fr; }
  .app { min-height: 0; }
  .app h2 { margin-top: 26px; }
  .app .art { width: 140px; height: 140px; }
}
