/* mteij.nl landing page */

:root {
  --text: #eef4f8;
  --muted: #9fb6c6;
  --glass: rgba(10, 30, 46, .38);
  --glass-hi: rgba(20, 52, 76, .5);
  --glass-solid: rgba(10, 26, 40, .88);
  --border: rgba(190, 225, 245, .16);
  --border-hi: rgba(155, 230, 242, .45);
  --accent: #5aa5d8;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  background: #060d13;
  color: var(--text);
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
[hidden] { display: none !important; }

/* ---- Background: misty forest, slowly drifting ---------------------- */
.bg { position: fixed; inset: 0; z-index: -2; overflow: hidden; background: #060d13; }
.bg::before {
  content: ""; position: absolute; inset: -4%;
  background: url(/assets/background.webp) center 40% / cover no-repeat;
  animation: drift 60s ease-in-out infinite alternate;
  will-change: transform;
}
.veil {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, rgba(6, 13, 19, .15), rgba(6, 13, 19, .62) 100%),
    linear-gradient(to bottom, rgba(6, 13, 19, .15), rgba(6, 13, 19, .55));
}
@keyframes drift {
  from { transform: scale(1.04) translate3d(-1%, 0, 0); }
  to   { transform: scale(1.12) translate3d(1.2%, -1%, 0); }
}

/* ---- Account header -------------------------------------------------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; justify-content: flex-end; padding: 1rem 1.25rem;
  animation: fade 1s .4s both;
}
.account { position: relative; }

.pill {
  display: inline-flex; align-items: center; gap: .55rem;
  height: 42px; padding: 0 1rem; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: .92rem; font-weight: 600; color: var(--text);
  background: var(--glass); border: 1px solid var(--border);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: background .25s, border-color .25s, transform .15s;
}
.pill:hover, .pill:focus-visible, .pill[aria-expanded="true"] {
  background: var(--glass-hi); border-color: var(--border-hi); outline: none;
}
.pill:active { transform: scale(.97); }
.pill.user { padding: 0 .9rem 0 .3rem; }
.pill .chevron { width: 14px; height: 14px; color: var(--muted); transition: transform .25s var(--ease); }
.pill[aria-expanded="true"] .chevron { transform: rotate(180deg); }

.avatar {
  display: grid; place-items: center; flex: none;
  width: 32px; height: 32px; border-radius: 50%;
  font-size: .8rem; font-weight: 700; letter-spacing: .02em; color: #04121c;
  background: linear-gradient(135deg, #7fbbe4, #9be6f2);
}
.avatar.lg { width: 44px; height: 44px; font-size: 1rem; }

.menu {
  position: absolute; top: calc(100% + .5rem); right: 0; width: 260px;
  padding: .5rem; border-radius: 18px;
  background: var(--glass-solid); border: 1px solid var(--border);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  transform-origin: top right;
  animation: pop .18s var(--ease);
}
.menu-head { display: flex; align-items: center; gap: .75rem; padding: .6rem .6rem .8rem; }
.menu-head .who { min-width: 0; }
.menu-head .who-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-head .who-sub { font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: .25rem .3rem; }
.menu-item {
  display: flex; width: 100%; align-items: center; gap: .65rem;
  padding: .6rem .7rem; border: 0; border-radius: 10px; cursor: pointer;
  font: inherit; font-size: .92rem; color: var(--text); text-decoration: none; text-align: left;
  background: transparent; transition: background .15s;
}
.menu-item:hover, .menu-item:focus-visible { background: rgba(155, 230, 242, .1); outline: none; }
.menu-item svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.menu-item.danger { color: #ffb3a8; }
.menu-item.danger svg { color: #ffb3a8; }

/* ---- Main ------------------------------------------------------------ */
/* Search bar is the vertical centre: equal rows above (greeting) and below (apps) */
main {
  min-height: 100%;
  display: grid; grid-template-rows: 1fr auto 1fr; justify-items: center;
  row-gap: 2.2rem; padding: 4.5rem 1.25rem 4rem; text-align: center;
}
.hello { align-self: end; }
.below {
  align-self: start; width: min(680px, 100%);
  display: flex; flex-direction: column; align-items: center; gap: 2rem;
}

.mark {
  width: 56px; height: 56px; opacity: .95;
  filter: drop-shadow(0 0 18px rgba(155, 230, 242, .45));
  animation: rise 1s var(--ease) both;
}
.time {
  font-size: clamp(3.4rem, 12vw, 7rem);
  font-weight: 200; letter-spacing: -.035em; line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .35);
  animation: rise 1s .08s var(--ease) both;
}
.greeting {
  margin-top: .8rem; font-size: clamp(1.05rem, 2.6vw, 1.4rem);
  color: var(--muted); animation: rise 1s .16s var(--ease) both;
}
.greeting b { color: var(--text); font-weight: 600; }

/* ---- Search ---------------------------------------------------------- */
form.search {
  width: min(640px, 100%);
  display: flex; align-items: center; gap: .75rem;
  padding: .35rem .4rem .35rem 1.3rem;
  background: var(--glass); border: 1px solid var(--border); border-radius: 999px;
  box-shadow: 0 12px 50px rgba(0, 0, 0, .35);
  backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3);
  transition: transform .3s var(--ease), background .3s, border-color .3s, box-shadow .3s;
  animation: rise 1s .24s var(--ease) both;
}
form.search:hover { background: var(--glass-hi); }
form.search:focus-within {
  transform: translateY(-2px) scale(1.012);
  background: var(--glass-hi);
  border-color: rgba(155, 230, 242, .55);
  box-shadow: 0 12px 60px rgba(0, 0, 0, .4), 0 0 0 4px rgba(90, 165, 216, .22), 0 0 50px rgba(155, 230, 242, .18);
}
form.search svg { flex: none; width: 20px; height: 20px; color: var(--muted); }
form.search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  color: var(--text); font: inherit; font-size: 1.1rem; padding: .9rem 0;
}
form.search input::placeholder { color: var(--muted); }
form.search kbd {
  font: inherit; font-size: .75rem; color: var(--muted);
  border: 1px solid var(--border); border-radius: 6px; padding: .1rem .45rem;
  transition: opacity .2s;
}
form.search:focus-within kbd { opacity: 0; }
form.search button {
  border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: .95rem;
  color: #04121c; background: linear-gradient(135deg, #7fbbe4, #9be6f2);
  border-radius: 999px; padding: .75rem 1.4rem;
  transition: filter .2s, transform .15s;
}
form.search button:hover { filter: brightness(1.1); }
form.search button:active { transform: scale(.96); }

/* Suggestions: the box grows downward into a panel */
form.search { position: relative; z-index: 5; }
form.search.open {
  border-radius: 26px 26px 0 0;
  background: var(--glass-solid);
  transform: none;
}
.suggestions {
  position: absolute; top: 100%; left: -1px; right: -1px;
  list-style: none; padding: .3rem 0 .6rem; margin: 0; text-align: left;
  background: var(--glass-solid);
  border: 1px solid rgba(155, 230, 242, .55); border-top-color: var(--border);
  border-radius: 0 0 26px 26px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, .45);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  animation: fade .12s both;
}
.suggestions li {
  padding: .55rem 1.3rem .55rem 3.3rem; cursor: pointer;
  color: var(--muted); font-size: 1rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.suggestions li b { color: var(--text); font-weight: 600; }
.suggestions li:hover, .suggestions li[aria-selected="true"] { background: rgba(155, 230, 242, .1); }

/* ---- App shortcuts: home-screen style icons ---------------------------- */
.apps {
  width: 100%;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 1.4rem .6rem;
  animation: rise 1s .34s var(--ease) both;
}
.app {
  display: flex; flex-direction: column; align-items: center; gap: .2rem;
  padding: .4rem .2rem; border-radius: 18px;
  text-decoration: none; color: var(--text); outline: none;
}
.app-icon {
  display: grid; place-items: center;
  width: 64px; height: 64px; margin-bottom: .45rem; border-radius: 18px;
  background: var(--glass); border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: transform .3s var(--ease), background .3s, border-color .3s, box-shadow .3s;
}
.app-icon img { width: 38px; height: 38px; object-fit: contain; }
.app-name { font-size: .88rem; font-weight: 600; }
.app-desc { font-size: .72rem; color: var(--muted); }
.app:hover .app-icon, .app:focus-visible .app-icon {
  transform: translateY(-4px) scale(1.05);
  background: var(--glass-hi); border-color: var(--border-hi);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .4), 0 0 24px rgba(155, 230, 242, .15);
}
.app:focus-visible .app-name { text-decoration: underline; text-underline-offset: 3px; }
.app:active .app-icon { transform: scale(.95); }

.admin { width: 100%; animation: rise 1s .44s var(--ease) both; }
.admin .app-icon { border-style: dashed; }

footer {
  position: fixed; bottom: 1rem; left: 0; right: 0; text-align: center;
  font-size: .8rem; color: rgba(159, 182, 198, .7); letter-spacing: .08em;
  pointer-events: none;
}

/* ---- Motion ---------------------------------------------------------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop  { from { opacity: 0; transform: scale(.96) translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- Small screens --------------------------------------------------- */
@media (max-width: 480px) {
  form.search button { padding: .7rem 1rem; }
  form.search kbd { display: none; }
  .pill.user .label { display: none; }
  .pill.user { padding: 0 .6rem 0 .3rem; }
  .apps { grid-template-columns: repeat(4, 1fr); gap: 1.1rem .2rem; }
  .app-icon { width: 56px; height: 56px; border-radius: 16px; }
  .app-icon img { width: 32px; height: 32px; }
}
