/*
 * waystone.space — the same stone and rune light as the app: black night, one cold blue accent.
 * Big Shoulders Display (signage) for headings, Overpass (highway signage) for everything else.
 * The hero is a Blender render (website/art); the rune's glow breathes and a few motes of light drift up.
 */

@font-face {
  font-family: 'Overpass';
  src: url('/fonts/overpass-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Big Shoulders Display';
  src: url('/fonts/big-shoulders-display-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --black: #000000;
  --basalt: #0b0c0f;
  --line: #1c1f25;
  --line-2: #2b3038;

  --ink: #eef2f8;
  --ink-2: #a9b2c0;
  --ink-3: #7a8494;

  --rune: #4a9eff;
  --rune-hi: #a6d0ff;
  --rune-deep: #3a8cf5;
  --rune-ink: #020a18;
  --sky: #86c1ff;

  --font-ui: 'Overpass', 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Big Shoulders Display', 'Bahnschrift Condensed', 'Arial Narrow', sans-serif;

  --shell: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* Where the hero render is anchored; site.js reads it to place the motes on the rune. */
  --art-position: 64% 50%;
}

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

html {
  background: var(--black);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

::selection {
  background: var(--rune);
  color: var(--rune-ink);
}

:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 3px;
  border-radius: 4px;
}

.shell {
  width: min(var(--shell), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

/* ── Navigation (floats over the hero) ──────────────────── */

.nav {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
}
.nav__inner {
  display: flex;
  align-items: center;
  height: 84px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 27px;
  line-height: 1;
  letter-spacing: 0.01em;
}
.brand__mark {
  width: 26px;
  height: 26px;
}

/* ── Hero ───────────────────────────────────────────────── */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: max(640px, min(100svh, 1000px));
  overflow: hidden;
}

.hero__scene {
  position: absolute;
  inset: 0;
  z-index: -1;
  animation: scene-in 1.4s var(--ease) both;
}
.hero__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--art-position);
}
/* The rune's bloom on its own, screened over the scene; it slowly brightens and dims. */
.hero__glow {
  mix-blend-mode: screen;
  opacity: 0;
  animation:
    glow-in 1.6s 0.5s var(--ease) forwards,
    rune-breathe 6s 2.1s ease-in-out infinite;
}
.hero__motes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
/* Shade the left for the headline, and let the bottom sink into the page. */
.hero__scene::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.38) 34%, rgba(0, 0, 0, 0) 58%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0) 68%, var(--black) 100%);
}

@keyframes scene-in {
  from {
    opacity: 0;
    transform: scale(1.04);
  }
}
@keyframes glow-in {
  to {
    opacity: 0.8;
  }
}
@keyframes rune-breathe {
  0%,
  100% {
    opacity: 0.8;
  }
  50% {
    opacity: 0.35;
  }
}

.hero__content {
  padding-block: 132px 112px;
}

.hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(52px, 5.8vw, 88px);
  line-height: 0.9;
  letter-spacing: -0.005em;
  text-shadow: 0 2px 32px rgba(0, 0, 0, 0.55);
}
.hero__title span {
  display: block;
}

.hero__lead {
  margin: 22px 0 0;
  font-size: clamp(18px, 1.5vw, 21px);
  color: var(--ink-2);
}

.cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 60px;
  margin-top: 36px;
  padding: 3px 30px 0 24px;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--rune-hi), var(--rune) 55%, var(--rune-deep));
  color: var(--rune-ink);
  text-decoration: none;
  font-size: 19px;
  font-weight: 750;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 10px 40px -8px rgba(74, 158, 255, 0.6);
  transition:
    transform 160ms var(--ease),
    box-shadow 160ms var(--ease);
}
.cta svg {
  width: 21px;
  height: 21px;
  margin-top: -3px;
  flex-shrink: 0;
}
.cta:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 14px 52px -6px rgba(74, 158, 255, 0.8);
}
.cta:active {
  transform: translateY(0);
}
/* A pass of rune light when the download starts, like the shimmer in the app's progress groove. */
.cta::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.6) 50%, transparent 80%);
  transform: translateX(-110%);
  pointer-events: none;
}
.cta.is-started::after {
  animation: cta-sweep 900ms var(--ease);
}
@keyframes cta-sweep {
  to {
    transform: translateX(110%);
  }
}

.hero__meta {
  margin: 16px 0 0;
  font-size: 15px;
  color: var(--ink-3);
}

.hero__after {
  margin: 20px 0 0;
  max-width: 34em;
  padding: 14px 18px 12px;
  border-left: 2px solid var(--rune);
  border-radius: 0 8px 8px 0;
  background: rgba(8, 20, 40, 0.72);
  backdrop-filter: blur(8px);
  color: var(--ink-2);
  font-size: 16px;
}
.hero__after b {
  color: var(--ink);
}

/* ── Showcase: the app, tilted back like a product shot ─── */

.showcase {
  position: relative;
  padding-top: clamp(24px, 4vw, 56px);
}

.showcase__title {
  margin: 0 0 clamp(32px, 5vw, 64px);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 5vw, 68px);
  line-height: 0.95;
  text-align: center;
}

.showcase__stage {
  position: relative;
  perspective: 2400px;
  pointer-events: none;
  user-select: none;
}
/* Rune light rising behind the window. */
.showcase__stage::before {
  content: '';
  position: absolute;
  inset: 8% 12% 20%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(74, 158, 255, 0.34), rgba(74, 158, 255, 0));
  filter: blur(56px);
}
.showcase__frame {
  position: relative;
  transform: rotateX(28deg) scale(0.94);
  transform-origin: 50% 0;
  border-radius: 16px;
  -webkit-mask-image: linear-gradient(180deg, #000 30%, rgba(0, 0, 0, 0.7) 62%, transparent 94%);
  mask-image: linear-gradient(180deg, #000 30%, rgba(0, 0, 0, 0.7) 62%, transparent 94%);
}
.showcase__frame img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: var(--basalt);
}
/* A thin line of light along the top edge, as if lit by the rune. */
.showcase__frame::after {
  content: '';
  position: absolute;
  inset: 0 6% auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(166, 208, 255, 0.9), transparent);
  box-shadow: 0 0 18px 2px rgba(74, 158, 255, 0.55);
}

/* ── Features ───────────────────────────────────────────── */

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
  margin-top: clamp(-120px, -6vw, -40px);
  padding: 0;
  list-style: none;
  position: relative;
}
.features svg {
  width: 44px;
  height: 44px;
  padding: 10px;
  margin-bottom: 18px;
  border: 1px solid rgba(74, 158, 255, 0.35);
  border-radius: 12px;
  background: rgba(74, 158, 255, 0.08);
  fill: none;
  stroke: var(--rune-hi);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  box-shadow: 0 0 24px -6px rgba(74, 158, 255, 0.6);
}
.features h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}
.features p {
  margin: 0;
  color: var(--ink-2);
  font-size: 17px;
}

/* ── Footer ─────────────────────────────────────────────── */

.footer {
  margin-top: clamp(88px, 11vw, 144px);
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 15px;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0 44px;
}
.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
  line-height: 1;
  color: var(--ink);
}
.footer__brand svg {
  width: 20px;
  height: 20px;
}

/* ── Not found ──────────────────────────────────────────── */

.lost {
  padding-block: clamp(140px, 18vw, 220px) clamp(72px, 10vw, 140px);
}
.lost h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(56px, 9vw, 120px);
  line-height: 0.9;
}
.lost p {
  margin: 24px 0 0;
  color: var(--ink-2);
}

/* ── Smaller screens: the scene sits above the headline ─── */

@media (max-width: 900px) {
  :root {
    --art-position: 89% 50%;
  }
  .hero {
    display: block;
    min-height: 0;
  }
  .hero__scene {
    position: relative;
    inset: auto;
    aspect-ratio: 4 / 5;
    max-height: 78svh;
    width: 100%;
  }
  .hero__scene::after {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 62%, var(--black) 100%);
  }
  .hero__content {
    position: relative;
    margin-top: -72px;
    padding-block: 0 56px;
  }
  .features {
    grid-template-columns: minmax(0, 1fr);
    margin-top: -24px;
  }
  .showcase__frame {
    transform: rotateX(22deg) scale(0.96);
  }
}

@media (max-width: 520px) {
  body {
    font-size: 17px;
  }
  .nav__inner {
    height: 68px;
  }
  .cta {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__scene,
  .hero__glow {
    animation: none;
    opacity: 1;
  }
  .hero__motes {
    display: none;
  }
  .cta,
  .cta::after {
    transition: none;
    animation: none !important;
  }
}
