/* Placeholder for www.uplytech.de until the Website goes live.
   Tokens, faces, panels and buttons mirror UplyTech/Website (app/globals.css,
   tailwind.config.ts) so the hand-over to the real site is seamless. Fonts are
   the same @fontsource files, served from here (OFL-1.1). */

@font-face { font-family: 'Inter'; font-weight: 400; font-style: normal; font-display: swap; src: url('fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-style: normal; font-display: swap; src: url('fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-style: normal; font-display: swap; src: url('fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 600; font-style: normal; font-display: swap; src: url('fonts/space-grotesk-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Unbounded'; font-weight: 500; font-style: normal; font-display: swap; src: url('fonts/unbounded-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 500; font-style: normal; font-display: swap; src: url('fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2'); }

:root {
  --font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', ui-sans-serif, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --font-nav: 'Unbounded', 'Inter', ui-sans-serif, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* Dark theme, the Website default. */
  --ink: 8 10 20;
  --surface: 15 18 32;
  --surface-2: 24 28 46;
  --glass-border: 4 6 14;
  --text: 237 240 250;
  --muted: 148 156 178;
  --primary: 109 106 255;
  --secondary: 63 208 201;
  --success: 52 211 153;
  --ring: 109 106 255;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --ink: 247 248 252;
    --surface: 255 255 255;
    --surface-2: 241 243 249;
    --glass-border: 203 210 224;
    --text: 17 24 39;
    --muted: 88 98 120;
    --primary: 87 80 232;
    --secondary: 14 156 154;
    --success: 5 150 105;
    --ring: 87 80 232;
    color-scheme: light;
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: rgb(var(--text));
  background-color: rgb(var(--ink));
  background-image:
    radial-gradient(60rem 40rem at 15% -10%, rgb(var(--primary) / 0.16), transparent 60%),
    radial-gradient(50rem 35rem at 95% 8%, rgb(var(--secondary) / 0.12), transparent 62%),
    radial-gradient(55rem 40rem at 8% 92%, rgb(var(--secondary) / 0.07), transparent 65%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background-color: rgb(var(--primary) / 0.3); color: rgb(var(--text)); }
:focus-visible { outline: 2px solid rgb(var(--ring)); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
@media (max-width: 480px) { h1, h2 { hyphens: auto; } }
p { margin: 0; }
a { color: inherit; }

/* Backdrop: WebGL canvas, the Website grid texture and grain. */
.backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.backdrop canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.6s var(--ease); }
.backdrop canvas.is-ready { opacity: 1; }
.backdrop .grid {
  position: absolute; inset: 0;
  background-image: url('grid.svg');
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, black, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, black, transparent 75%);
  opacity: 0.07;
}
.backdrop .noise { position: absolute; inset: 0; background-image: url('noise.png'); opacity: 0.018; mix-blend-mode: soft-light; }
@media (prefers-color-scheme: light) {
  .backdrop .grid { filter: invert(1); opacity: 0.08; }
}

.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 1.25rem; }
@media (min-width: 640px) { .container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }

/* Panels and buttons: the Website's .glass, .glass-strong and .btn-* classes. */
.glass {
  border: 1px solid rgb(var(--glass-border) / 0.1);
  background-color: rgb(var(--surface) / 0.6);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  box-shadow: 0 1px 2px -1px rgb(0 0 0 / 0.45), 0 14px 34px -20px rgb(0 0 0 / 0.75);
}
.glass-strong {
  border: 1px solid rgb(var(--glass-border) / 0.15);
  background-color: rgb(var(--surface) / 0.8);
  -webkit-backdrop-filter: blur(40px);
  backdrop-filter: blur(40px);
  box-shadow: 0 24px 60px -30px rgb(0 0 0 / 0.65);
}
@media (prefers-color-scheme: light) {
  .glass, .glass-strong { box-shadow: 0 1px 2px -1px rgb(15 23 42 / 0.12), 0 14px 34px -20px rgb(15 23 42 / 0.25); }
}

.btn-primary, .btn-glass {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.875rem; padding: 0.75rem 1.5rem; border-radius: 9999px;
  font-size: 0.875rem; font-weight: 500; line-height: 1.25rem; white-space: nowrap; text-decoration: none;
  transition: transform 0.3s var(--ease), filter 0.3s var(--ease), background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn-primary {
  color: #fff;
  background-image: linear-gradient(135deg, rgb(var(--primary)), rgb(var(--secondary)));
  box-shadow: 0 0 0 1px rgb(var(--primary) / 0.35), 0 0 40px -8px rgb(var(--primary) / 0.55);
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.1); }
.btn-primary:active { transform: translateY(0); }
.btn-glass { color: rgb(var(--text)); }
.btn-glass:hover { border-color: rgb(var(--glass-border) / 0.25); background-color: rgb(var(--surface-2) / 0.7); }
.btn-primary svg, .btn-glass svg { width: 1rem; height: 1rem; flex: none; }

.eyebrow {
  font-family: var(--font-mono); font-size: 0.75rem; line-height: 1rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.18em; color: rgb(var(--secondary));
}
.text-gradient {
  background-image: linear-gradient(135deg, rgb(var(--primary)), rgb(var(--secondary)));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.muted { color: rgb(var(--muted)); }

.status-dot { position: relative; display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 9999px; background: rgb(var(--success)); }
.status-dot::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: inherit; animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite; }
@keyframes ping { 75%, 100% { transform: scale(2.4); opacity: 0; } }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 100; padding: 0.5rem 1rem; border-radius: 9999px; }

/* Header: the Website's floating glass bar. */
.site-header { position: sticky; top: 0; z-index: 10; }
.site-header .bar {
  margin-top: 0.75rem; height: 4rem; padding: 0 1rem; border-radius: 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
@media (min-width: 640px) { .site-header .bar { margin-top: 1rem; height: 4.5rem; padding: 0 1.5rem; } }
.brand { display: inline-flex; align-items: center; gap: 0.625rem; text-decoration: none; }
.brand img { width: 2rem; height: 2rem; display: block; }
.brand span { font-family: var(--font-display); font-size: 1.125rem; font-weight: 600; letter-spacing: -0.025em; }
.site-header nav { display: flex; gap: 0.25rem; }
.site-header nav a {
  font-family: var(--font-nav); font-size: 0.8125rem; font-weight: 500; letter-spacing: -0.01em;
  color: rgb(var(--muted)); text-decoration: none; padding: 0.5rem 0.75rem; border-radius: 9999px;
  transition: color 0.2s var(--ease);
}
.site-header nav a:hover, .site-header nav a[aria-current='page'] { color: rgb(var(--text)); }
@media (max-width: 479px) { .site-header nav a { padding: 0.5rem; font-size: 0.75rem; } }

main { flex: 1; display: flex; }

/* Landing hero */
.hero { flex: 1; display: grid; align-content: center; justify-items: center; text-align: center; padding-block: 4rem 5rem; }
.pill {
  display: inline-flex; align-items: center; gap: 0.625rem; padding: 0.375rem 1rem; border-radius: 9999px;
  border: 1px solid rgb(var(--glass-border) / 0.15); background-color: rgb(var(--surface-2) / 0.6);
}
.hero h1 {
  margin-top: 1.5rem; max-width: 16ch;
  font-size: clamp(2rem, 1.21rem + 3.48vw, 3.8rem); line-height: 1.07; letter-spacing: -0.03em;
}
.lead { margin-top: 1.25rem; max-width: 54ch; font-size: clamp(1.0625rem, 0.99rem + 0.33vw, 1.25rem); line-height: 1.65; color: rgb(var(--muted)); }
.lead + .lead { margin-top: 0.25rem; font-size: 1rem; }
.actions { margin-top: 2.25rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }

.reveal { opacity: 0; transform: translateY(24px); animation: fade-up 0.6s var(--ease) forwards; }
.reveal.d1 { animation-delay: 0.05s; } .reveal.d2 { animation-delay: 0.1s; } .reveal.d3 { animation-delay: 0.15s; }
@keyframes fade-up { to { opacity: 1; transform: none; } }

/* Legal pages */
.doc { width: 100%; max-width: 46rem; margin: 2.5rem auto 4rem; padding: 2rem 1.5rem; border-radius: 1.75rem; }
@media (min-width: 640px) { .doc { padding: 2.75rem 3rem; } }
.doc h1 { font-size: clamp(1.6875rem, 1.20rem + 2.17vw, 2.8rem); line-height: 1.12; letter-spacing: -0.025em; margin-top: 0.75rem; }
.doc h2 { font-size: 1.125rem; letter-spacing: -0.01em; margin-top: 2.25rem; }
.doc p { margin-top: 0.75rem; color: rgb(var(--muted)); }
.doc p strong { color: rgb(var(--text)); font-weight: 500; }
.doc a { color: rgb(var(--text)); text-decoration-color: rgb(var(--primary) / 0.6); text-underline-offset: 3px; }
.doc a:hover { color: rgb(var(--primary)); }
.doc .stand { margin-top: 2.5rem; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; }

/* Footer */
.site-footer { padding: 1.5rem 0 2rem; font-size: 0.875rem; color: rgb(var(--muted)); }
.site-footer .row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; }
.site-footer nav { display: flex; gap: 1.25rem; }
.site-footer a { color: rgb(var(--muted)); text-decoration: none; transition: color 0.2s var(--ease); }
.site-footer a:hover { color: rgb(var(--text)); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
