/* Skilient coming soon: a static copy of the "/" landing page (tokens from app/styles/tokens.css). */

@font-face {
  font-family: Spectral;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(assets/fonts/spectral-500.woff2) format("woff2");
}
@font-face {
  font-family: Barlow;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(assets/fonts/barlow-400.woff2) format("woff2");
}
@font-face {
  font-family: Barlow;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(assets/fonts/barlow-500.woff2) format("woff2");
}
/* Metric-matched fallbacks, as next/font generates them, so nothing jumps while fonts load. */
@font-face {
  font-family: "Spectral Fallback";
  src: local("Times New Roman");
  ascent-override: 96.46%;
  descent-override: 42.17%;
  line-gap-override: 0%;
  size-adjust: 109.78%;
}
@font-face {
  font-family: "Barlow Fallback";
  src: local("Arial");
  ascent-override: 103.43%;
  descent-override: 20.69%;
  line-gap-override: 0%;
  size-adjust: 96.68%;
}

:root {
  color-scheme: light;
  --bg-page: #f0efed;
  --text-primary: #0e0d0b;
  --text-secondary: #484744;
  --text-muted: #636260;
  --border-default: #cecdca;
  --accent: #c03910;
  --accent-subtle: #fff2ee;
  --page-gutter: clamp(1rem, 5vw, 2.5rem);
  --page-max: 1280px;
  --font-display: Spectral, "Spectral Fallback", Georgia, "Times New Roman", serif;
  --font-sans: Barlow, "Barlow Fallback", ui-sans-serif, system-ui, sans-serif;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg-page: #0a0a09;
    --text-primary: #e7e7e3;
    --text-secondary: #b8b7b2;
    --text-muted: #8a8a84;
    --border-default: #2a2a26;
    --accent: #e04020;
    --accent-subtle: #2e1408;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0 solid;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--accent);
  accent-color: var(--accent);
}

body {
  background-color: var(--bg-page);
  color: var(--text-primary);
}

::selection {
  background-color: var(--accent-subtle);
  color: var(--text-primary);
}

img,
svg {
  display: block;
  max-width: 100%;
}

/* Layout: same as the app's "/" (min-h-dvh, max-w-page, gap-16, py-10, page gutter). */
.page {
  margin-inline: auto;
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: var(--page-max);
  flex-direction: column;
  justify-content: space-between;
  gap: 4rem;
  padding: 2.5rem var(--page-gutter);
}

/* The header kept the theme toggle's 40px height, so the logo sits where it did. */
.header {
  display: flex;
  min-height: 40px;
  align-items: center;
}

.logo {
  height: 2.5rem;
  width: 11rem;
  overflow: visible;
}

/* The logo, inline so its parts can move. Colours follow the theme (reversed logo in dark). */
.logo .ink {
  fill: var(--text-primary);
}
.logo .accent {
  fill: var(--accent);
}
.logo .orbit {
  fill: none;
  stroke: var(--accent);
  stroke-width: 28;
}

/*
 * Entrance, once (about 1.6s): the core lights, the chain grows out of it, the side nodes
 * arrive, the orbits draw, the letters wipe in, the K's arrow shoots up and to the right and
 * the i-dot lands. Every part is drawn in its final state by default; the keyframes only
 * start from hidden, so a browser without animation still shows the whole logo.
 */
.logo .core,
.logo .node,
.logo .chain,
.logo .arrow,
.logo .dot {
  transform-box: fill-box;
  transform-origin: center;
}
.logo .core {
  animation: logo-pop 520ms var(--ease-out-expo) both;
}
.logo .chain {
  animation: logo-grow 760ms var(--ease-out-expo) 120ms both;
}
.logo .node {
  animation: logo-pop 520ms var(--ease-out-expo) 300ms both;
}
.logo .node--r {
  animation-delay: 380ms;
}
.logo .orbit {
  stroke-dasharray: 100;
  animation: logo-draw 820ms var(--ease-out-expo) 420ms both;
}
.logo .orbit--late {
  animation-delay: 540ms;
}
.logo .letters {
  animation: logo-wipe 900ms var(--ease-out-expo) 360ms both;
}
.logo .arrow {
  transform-origin: 6% 94%;
  animation:
    logo-launch 620ms var(--ease-out-expo) 900ms both,
    logo-lift 6s var(--ease-standard) 3.5s infinite;
}
.logo .dot {
  animation: logo-land 560ms var(--ease-out-expo) 1080ms both;
}

@keyframes logo-pop {
  from {
    transform: scale(0);
    opacity: 0;
  }
}
@keyframes logo-grow {
  from {
    clip-path: inset(50% 0 50% 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}
@keyframes logo-draw {
  from {
    stroke-dashoffset: 100;
  }
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes logo-wipe {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}
@keyframes logo-launch {
  from {
    transform: translate(-22%, 22%) scale(0.35);
    opacity: 0;
  }
}
@keyframes logo-land {
  from {
    transform: translateY(-140%);
    opacity: 0;
  }
}
/* Idle: every 6s the arrow lifts a hair up and to the right, then settles. */
@keyframes logo-lift {
  0%,
  86%,
  100% {
    transform: translate(0, 0);
  }
  91% {
    transform: translate(3%, -3%);
  }
}

.hero {
  display: flex;
  max-width: 48rem;
  flex-direction: column;
  gap: 1.5rem;
}

.headline {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 5.5vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 500;
}

.lede {
  font-size: 18px;
  line-height: 1.65;
  color: var(--text-secondary);
}

.footer {
  font-size: 11px;
  line-height: 1.45;
  font-weight: 500;
  color: var(--text-muted);
}

/* Coming soon: the mark "loading", with a thin vermillion line underneath the words. */
.soon {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.soon-text {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 2.2vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 500;
  color: var(--accent);
}

.soon-bar {
  position: relative;
  display: block;
  height: 2px;
  width: 100%;
  overflow: hidden;
  border-radius: 999px;
  background: var(--border-default);
}
.soon-bar::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 40%;
  border-radius: inherit;
  background: var(--accent);
  animation: sweep 2.4s var(--ease-standard) infinite;
}

.mark {
  width: 2.75rem;
  height: 2.75rem;
  flex: none;
}
.mark .ink {
  fill: var(--text-primary);
}
.mark .core {
  fill: var(--accent);
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse 2.4s ease-in-out infinite;
}
.mark .orbit {
  fill: none;
  stroke: var(--accent);
  stroke-width: 28;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: draw 2.4s var(--ease-standard) infinite;
}
.mark .orbit--late {
  animation-delay: 0.3s;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.35);
    opacity: 0.7;
  }
}

@keyframes draw {
  0% {
    stroke-dashoffset: 100;
    opacity: 1;
  }
  55% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  85%,
  100% {
    stroke-dashoffset: 0;
    opacity: 0;
  }
}

@keyframes sweep {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(250%);
  }
}

/* Reduced motion: a still logo, a still, fully drawn mark and a half-filled line. */
@media (prefers-reduced-motion: reduce) {
  .mark .core,
  .mark .orbit,
  .soon-bar::after,
  .logo .core,
  .logo .chain,
  .logo .node,
  .logo .orbit,
  .logo .letters,
  .logo .arrow,
  .logo .dot {
    animation: none;
  }
  .mark .orbit,
  .logo .orbit {
    stroke-dashoffset: 0;
  }
  .soon-bar::after {
    width: 60%;
  }
}
