/* tempox.cloud — styles shared by / and the 404 page.
   Design language follows the tempox.io teaser (sites/tempox-site): brushed-metal
   background with a slow Ken Burns zoom, black gradient overlay, the white TEMPOX
   wordmark, light uppercase type with wide tracking, thin white/30 rule, small
   white/30–60 labels, system sans-serif font. No web fonts, no scripts. */

:root {
  --bg: #0f0f0f;
  --fg: #ffffff;
  --fg-90: rgba(255, 255, 255, .9);
  --fg-70: rgba(255, 255, 255, .7);
  --fg-60: rgba(255, 255, 255, .6);
  --fg-50: rgba(255, 255, 255, .5);
  --fg-40: rgba(255, 255, 255, .4);
  --fg-30: rgba(255, 255, 255, .3);
  --line: rgba(255, 255, 255, .25);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  letter-spacing: .025em;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- background ---------- */
.bg { position: fixed; inset: 0; overflow: hidden; z-index: 0; }
.bg-img {
  position: absolute; inset: 0;
  background-color: var(--bg);
  background-image: url("/assets/bg.jpg");
  background-image: image-set(url("/assets/bg.webp") type("image/webp"), url("/assets/bg.jpg") type("image/jpeg"));
  background-size: cover;
  background-position: center;
  transform-origin: center;
  animation: ken-burns 10s cubic-bezier(.25, .1, .25, 1) forwards;
}
.bg-shade {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .8), rgba(0, 0, 0, .5), rgba(0, 0, 0, .3));
}

.dots { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
.dots span { position: absolute; border-radius: 9999px; background: rgba(255, 255, 255, .1); }
.dots span:nth-child(1) { width: 4px;  height: 4px;  left: 15%; top: 20%; animation: float 6s ease-in-out 0s infinite; }
.dots span:nth-child(2) { width: 6px;  height: 6px;  left: 33%; top: 32%; animation: float 8s ease-in-out .8s infinite; }
.dots span:nth-child(3) { width: 8px;  height: 8px;  left: 51%; top: 44%; animation: float 10s ease-in-out 1.6s infinite; }
.dots span:nth-child(4) { width: 10px; height: 10px; left: 69%; top: 56%; animation: float 12s ease-in-out 2.4s infinite; }
.dots span:nth-child(5) { width: 12px; height: 12px; left: 87%; top: 68%; animation: float 14s ease-in-out 3.2s infinite; }

/* ---------- content ---------- */
.hero {
  position: relative; z-index: 2;
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: max(48px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) 32px max(24px, env(safe-area-inset-left));
  text-align: center;
}

.brand { margin: 0; display: flex; flex-direction: column; align-items: center; font-weight: 300; }
.logo { display: block; height: 48px; width: auto; }
.product {
  display: block;
  margin-top: 22px;
  padding-left: .55em; /* balance the trailing letter-spacing so the word stays centred */
  font-size: 18px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: .55em;
  text-transform: uppercase;
  color: var(--fg-90);
}

.rule { width: 40px; height: 1px; margin: 40px auto 0; background: var(--fg-30); }

.desc-zh { margin: 36px 0 0; font-size: 15px; line-height: 1.9; letter-spacing: .15em; color: var(--fg-70); }
.desc-en { margin: 8px 0 0; font-size: 11px; font-weight: 300; letter-spacing: .2em; text-transform: uppercase; color: var(--fg-40); }

.cta {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 40px;
  min-height: 44px;
  padding: 10px 22px;
  border: 1px solid var(--line);
  border-radius: 9999px;
  color: var(--fg-70);
  font-size: 13px;
  letter-spacing: .15em;
  text-decoration: none;
  transition: color .3s, border-color .3s, background-color .3s;
}
.cta:hover { color: var(--fg); border-color: rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .06); }
.cta .en { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--fg-50); }
.cta:hover .en { color: var(--fg-70); }
.cta .arrow { font-size: 14px; letter-spacing: 0; }

.contact { margin-top: 48px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.contact .label { font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--fg-30); }
.contact a { color: var(--fg-50); font-size: 12px; letter-spacing: .2em; text-decoration: none; transition: color .3s; }
.contact a:hover { color: var(--fg); }

a:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; border-radius: 4px; }
.cta:focus-visible { border-radius: 9999px; }

.foot {
  position: relative; z-index: 2;
  padding: 0 24px max(24px, env(safe-area-inset-bottom));
  text-align: center;
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--fg-30);
}

/* 404 */
.code { margin: 40px 0 0; font-size: 40px; font-weight: 200; letter-spacing: .3em; padding-left: .3em; color: var(--fg-90); line-height: 1; }

/* ---------- entrance (mirrors the teaser: fade up .8s, staggered) ---------- */
.fx { animation: fade-up .8s ease-out both; }
.fx-1 { animation-delay: .3s; }
.fx-2 { animation-delay: .6s; }
.fx-3 { animation-delay: .9s; }
.fx-4 { animation-delay: 1.2s; }
.fx-5 { animation-delay: 1.4s; }
.fx-6 { animation-delay: 1.6s; }

@keyframes fade-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes ken-burns { from { transform: scale(1.12); } to { transform: scale(1); } }
@keyframes float {
  0%, 100% { transform: translate(0, 0); opacity: .3; }
  50% { transform: translate(10px, -20px); opacity: .6; }
}

@media (min-width: 768px) {
  .logo { height: 72px; }
  .product { margin-top: 30px; font-size: 24px; }
  .rule { margin-top: 52px; }
  .desc-zh { margin-top: 44px; font-size: 17px; }
  .desc-en { font-size: 12px; }
  .cta { margin-top: 48px; font-size: 14px; }
  .contact { margin-top: 64px; }
  .contact .label { font-size: 12px; }
  .contact a { font-size: 14px; }
  .foot { font-size: 11px; }
  .code { font-size: 56px; }
}

@media (min-width: 1024px) {
  .logo { height: 92px; }
  .product { margin-top: 36px; font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .bg-img, .dots span, .fx { animation: none; }
}
