/* wallnetic.app: the page is a live wallpaper with one window of text in
   front of it. No web fonts and no third-party requests. */

:root {
  color-scheme: dark light;
  --ink: #05070d;
  --ink-2: #0b1020;
  --paper: #eef2f8;
  --muted: rgba(226, 233, 245, 0.68);
  --line: rgba(226, 233, 245, 0.14);
  --glass: rgba(10, 14, 26, 0.46);
  --cyan: #4cd9eb;
  --blue: #6bb5ff;
  --violet: #a673ff;
  --amber: #f2a64d;
  --focus: #ffd38a;
  --serif: "New York", ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, "Cascadia Mono", Consolas, monospace;
  --sans: ui-rounded, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --ink: #f4efe7;
    --ink-2: #e9e2d6;
    --paper: #14161f;
    --muted: rgba(20, 22, 31, 0.7);
    --line: rgba(20, 22, 31, 0.14);
    --glass: rgba(255, 252, 246, 0.5);
    --cyan: #2fb3c4;
    --blue: #6f9fe0;
    --violet: #c49bff;
    --amber: #f0a256;
    --focus: #8a4b00;
  }
}

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

html { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- The wallpaper ---------- */

.wallpaper {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  background:
    radial-gradient(120% 90% at 85% 110%, var(--ink-2) 0%, transparent 60%),
    linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
}

.wallpaper .field {
  position: absolute;
  width: 90vmax;
  height: 90vmax;
  border-radius: 50%;
  opacity: 0.55;
  will-change: transform;
  animation: drift 62s ease-in-out infinite alternate;
}

.wallpaper .field.one {
  left: -30vmax;
  top: -35vmax;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--cyan) 70%, transparent), transparent 72%);
}

.wallpaper .field.two {
  right: -38vmax;
  top: -10vmax;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--violet) 55%, transparent), transparent 70%);
  animation-duration: 84s;
  animation-delay: -20s;
}

.wallpaper .field.three {
  left: 10vmax;
  bottom: -55vmax;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--blue) 60%, transparent), transparent 70%);
  animation-duration: 97s;
  animation-delay: -45s;
}

.wallpaper .field.four {
  right: -20vmax;
  bottom: -60vmax;
  width: 60vmax;
  height: 60vmax;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--amber) 45%, transparent), transparent 70%);
  opacity: 0.35;
  animation-duration: 113s;
  animation-delay: -60s;
}

/* Film grain keeps the gradients from banding. */
.wallpaper::after {
  content: "";
  position: absolute;
  inset: -50%;
  opacity: 0.09;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
  pointer-events: none;
}

@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50%  { transform: translate3d(6vmax, 4vmax, 0) rotate(18deg) scale(1.08); }
  100% { transform: translate3d(-4vmax, 7vmax, 0) rotate(-12deg) scale(0.96); }
}

/* The desktop clock, as Wallnetic draws it: decorative and silent. */
.desktop-clock {
  position: fixed;
  top: clamp(4.5rem, 9vh, 7rem);
  right: clamp(1.25rem, 5vw, 4.5rem);
  z-index: 1;
  text-align: right;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  user-select: none;
}

@media (prefers-color-scheme: light) {
  .desktop-clock { color: rgba(20, 22, 31, 0.82); text-shadow: 0 1px 14px rgba(255, 255, 255, 0.6); }
}

.desktop-clock .time {
  display: block;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(3.5rem, 11vw, 8.5rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.desktop-clock .date {
  display: block;
  margin-top: 0.6rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.8;
}

.desktop-clock:empty { display: none; }

/* ---------- The window in front ---------- */

.desktop {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: minmax(0, 1fr);
}

.menubar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem clamp(1.25rem, 5vw, 4.5rem);
  font-size: 0.85rem;
  background: color-mix(in srgb, var(--ink) 35%, transparent);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.menubar a { color: inherit; text-decoration: none; }

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.wordmark img { width: 1.35rem; height: 1.35rem; border-radius: 0.32rem; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.status::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--amber) 60%, transparent);
  animation: pulse 2.8s ease-out infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--amber) 55%, transparent); }
  80%, 100% { box-shadow: 0 0 0 0.6rem transparent; }
}

main {
  display: flex;
  align-items: flex-end;
  padding: clamp(2rem, 6vh, 4rem) clamp(1.25rem, 5vw, 4.5rem);
}

.window {
  width: min(43rem, 100%);
  padding: clamp(1.5rem, 3.4vw, 2.6rem);
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  background: var(--glass);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.55);
}

.app {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: 1.6rem;
}

.app img {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 1.05rem;
  box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.45);
}

.kicker {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cyan);
}

.app-name {
  margin: 0.2rem 0 0;
  font-size: 1.15rem;
  font-weight: 650;
}

h1 {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 6.2vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
}

h1 em {
  font-style: italic;
  background: linear-gradient(100deg, var(--cyan), var(--blue) 45%, var(--violet) 75%, var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.pitch {
  margin: 0 0 1.4rem;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.note {
  margin: 0 0 1.7rem;
  padding: 0.85rem 1rem;
  border-left: 2px solid var(--amber);
  border-radius: 0 0.6rem 0.6rem 0;
  background: color-mix(in srgb, var(--amber) 9%, transparent);
  font-size: 0.95rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.9rem;
  padding: 0.7rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--paper);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  background: color-mix(in srgb, var(--paper) 6%, transparent);
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.button:hover { background: color-mix(in srgb, var(--paper) 12%, transparent); transform: translateY(-1px); }

.button.primary {
  border-color: transparent;
  color: #061016;
  background: linear-gradient(100deg, var(--cyan), var(--blue));
}

.button.primary:hover { filter: brightness(1.07); }

.button svg { width: 1.05rem; height: 1.05rem; flex: none; }

a:focus-visible, .button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 1.1rem clamp(1.25rem, 5vw, 4.5rem) 1.4rem;
  font-size: 0.85rem;
  color: var(--muted);
}

footer nav { display: flex; flex-wrap: wrap; gap: 1.2rem; }

footer a { color: inherit; text-underline-offset: 0.2em; }

footer a:hover { color: var(--paper); }

/* ---------- Support page ---------- */

.window.wide { width: min(46rem, 100%); }

.window h2 {
  margin: 2rem 0 0.6rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.45rem;
}

.window p { margin: 0 0 0.9rem; }

.window a:not(.button) { color: var(--cyan); text-underline-offset: 0.2em; }

.contact {
  display: grid;
  gap: 0.75rem;
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
}

details {
  border-top: 1px solid var(--line);
  padding: 0.85rem 0;
}

details:last-of-type { border-bottom: 1px solid var(--line); }

summary {
  cursor: pointer;
  font-weight: 600;
}

details p { margin: 0.6rem 0 0; color: var(--muted); }

details + p { margin-top: 1.4rem; }

/* ---------- Entrance ---------- */

.rise { animation: rise 900ms cubic-bezier(.2, .7, .2, 1) both; }
.rise.d1 { animation-delay: 120ms; }
.rise.d2 { animation-delay: 240ms; }
.rise.d3 { animation-delay: 360ms; }
.rise.d4 { animation-delay: 480ms; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 40rem) {
  main { align-items: flex-start; padding-top: 7.5rem; }
  .desktop-clock { position: absolute; top: 3.6rem; right: 1.25rem; }
  .desktop-clock .time { font-size: 3.1rem; }
  .desktop-clock .date { font-size: 0.66rem; letter-spacing: 0.16em; }
  .menubar .status { display: none; }
  .kicker { letter-spacing: 0.16em; }
}

/* A page without the clock needs no room for it. */
@media (max-width: 40rem) {
  body:not(:has([data-clock])) main { padding-top: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .wallpaper .field, .status::before, .rise { animation: none; }
  .button { transition: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .window, .menubar { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--ink-2); }
}
