/* KynForge public page. Hand-written; the hub's Tailwind build is not loaded here. */

@font-face {
  font-family: "Bricolage";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/fonts/bricolage-latin.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/fonts/bricolage-latin-ext.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --night: #0d1022;
  --violet: #3b2d7a;
  --teal: #0f5f6e;
  --ink: #eef0ff;
  --mist: #b8bfe8;
  --haze: #8a91c2;
  --cyan: #8fe3ff;
  --display: "Bricolage", ui-sans-serif, system-ui, sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  color-scheme: dark;
}

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

html {
  background: var(--night);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  position: relative;
  margin: 0;
  min-height: 100svh;
  overflow-x: hidden;
  background: transparent;
  line-height: 1.6;
}

a {
  color: inherit;
}

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

::selection {
  background: rgb(143 227 255 / 0.3);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Background layers ---------- */

.plasma,
.sparks,
.glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.plasma {
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 2.2s ease;
}
.has-plasma .plasma {
  opacity: 1;
}

.glow {
  z-index: 0;
  animation: bloom 2.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  transition: opacity 2.2s ease;
}
.glow-a {
  background: radial-gradient(110vmax 80vmax at 5% -5%, var(--violet) 0%, transparent 62%);
}
.glow-b {
  background: radial-gradient(95vmax 70vmax at 100% 105%, var(--teal) 0%, transparent 60%);
  animation-delay: 0.25s;
}
/* The shader carries the color once it runs; the CSS glows stay as a soft floor. */
.has-plasma .glow {
  opacity: 0.35;
}

.sparks {
  z-index: 3;
  width: 100%;
  height: 100%;
}

@keyframes bloom {
  from {
    opacity: 0;
    transform: scale(0.82);
  }
}

/* ---------- Layout ---------- */

.topbar {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top));
  right: var(--gutter);
  z-index: 5;
}

.hub-link {
  display: inline-block;
  padding: 0.5rem 1.05rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  background: linear-gradient(rgb(255 255 255 / 0.09), rgb(255 255 255 / 0.04)), rgb(13 16 34 / 0.45);
  border: 1px solid rgb(255 255 255 / 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.2s, background-color 0.2s;
}
.hub-link:hover {
  border-color: rgb(143 227 255 / 0.55);
}

main {
  position: relative;
  z-index: 2;
  padding-bottom: 4.5rem; /* room for the footer pinned to the bottom of the page */
}

.hero {
  min-height: calc(100svh - 4.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 7rem var(--gutter) 5rem;
}

/* ---------- The wordmark: the one loud thing ---------- */

.wordmark {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.4rem, 16.5vw, 14rem);
  line-height: 0.92;
  letter-spacing: -0.055em;
  margin-left: -0.04em;
}

.letters {
  display: inline-block;
  white-space: nowrap;
}

.letters span {
  display: inline-block;
  color: var(--ink);
  text-shadow:
    0 0 0.18em rgb(143 227 255 / 0.28),
    0 0 0.6em rgb(120 130 255 / 0.18);
  animation:
    rise 1s cubic-bezier(0.2, 0.75, 0.2, 1) both,
    heat 1.5s ease-in-out both;
  animation-delay:
    calc(0.15s + var(--i) * 0.07s),
    calc(1.35s + var(--i) * 0.085s);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.38em) scale(0.94);
    filter: blur(14px);
  }
}

@keyframes heat {
  45% {
    color: #ffffff;
    text-shadow:
      0 0 0.12em rgb(255 255 255 / 0.9),
      0 0 0.35em rgb(143 227 255 / 0.85),
      0 0 0.9em rgb(150 120 255 / 0.55);
  }
}

/* Flare when someone strikes the anvil (class toggled by site.js). */
.wordmark.struck .letters span {
  animation: flare 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  animation-delay: calc(var(--i) * 0.025s);
}

@keyframes flare {
  20% {
    color: #ffffff;
    transform: translateY(-0.03em);
    text-shadow:
      0 0 0.1em #fff,
      0 0 0.4em rgb(143 227 255 / 0.95),
      0 0 1.1em rgb(150 120 255 / 0.7);
  }
}

.headline {
  margin: 1.6rem 0 0;
  max-width: 34ch;
  font-size: clamp(1.15rem, 2.3vw, 1.65rem);
  line-height: 1.4;
  color: var(--mist);
  animation: fade-in 1s ease 1.1s both;
}

.byline {
  margin: 0.55rem 0 0;
  color: var(--haze);
  font-size: 1rem;
  animation: fade-in 1s ease 1.25s both;
}

.now {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  align-self: flex-start;
  margin: 1.6rem 0 0;
  padding: 0.5rem 1rem 0.5rem 0.8rem;
  border-radius: 999px;
  font-size: 0.95rem;
  color: var(--ink);
  background: linear-gradient(rgb(255 255 255 / 0.08), rgb(255 255 255 / 0.035)), rgb(13 16 34 / 0.45);
  border: 1px solid rgb(255 255 255 / 0.13);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fade-in 1s ease 1.4s both;
}

.pulse {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgb(143 227 255 / 0.6);
  animation: pulse 2.2s ease-out infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 0.7rem rgb(143 227 255 / 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgb(143 227 255 / 0);
  }
}

.hint {
  margin: 2.6rem 0 0;
  font-size: 0.9rem;
  color: var(--haze);
  animation: fade-in 1.2s ease 2.6s both;
  transition: opacity 0.8s ease;
}
.hint.done {
  opacity: 0;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(0.4rem);
  }
}

/* ---------- Content sections ---------- */

.section {
  max-width: 72rem;
  padding: 0 var(--gutter) clamp(4rem, 9vw, 7rem);
}

.section h2 {
  margin: 0 0 1.5rem;
  font-family: var(--display);
  font-weight: 650;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.about {
  max-width: calc(62ch + 2 * var(--gutter));
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.75;
  color: var(--mist);
}
.about p {
  margin: 0 0 1em;
}

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  height: 100%;
  padding: 1.3rem 1.35rem 1.2rem;
  border-radius: 1.25rem;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(rgb(255 255 255 / 0.075), rgb(255 255 255 / 0.035)), rgb(13 16 34 / 0.5);
  border: 1px solid rgb(255 255 255 / 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color 0.25s ease, transform 0.25s ease;
}
/* Pointer-following glow; site.js sets --mx and --my. */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, -200px), rgb(143 227 255 / 0.16), transparent 65%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.card:hover::before {
  opacity: 1;
}
a.card:hover {
  border-color: rgb(143 227 255 / 0.45);
  transform: translateY(-2px);
}

.card h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 650;
  font-size: 1.3rem;
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.card p {
  margin: 0;
  color: var(--mist);
  font-size: 0.98rem;
}
.card-host {
  margin-top: auto;
  padding-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--cyan);
}

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

.pill {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  background: linear-gradient(rgb(255 255 255 / 0.08), rgb(255 255 255 / 0.035)), rgb(13 16 34 / 0.45);
  border: 1px solid rgb(255 255 255 / 0.13);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.pill:hover {
  border-color: rgb(143 227 255 / 0.55);
  color: #fff;
}

.foot {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  padding: 2rem var(--gutter) max(2rem, env(safe-area-inset-bottom));
  font-size: 0.85rem;
  color: var(--haze);
}

/* ---------- 404 ---------- */

.lost {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--gutter);
}
.lost h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.4rem, 8vw, 5rem);
  letter-spacing: -0.04em;
  line-height: 1;
}
.lost a {
  color: var(--cyan);
}

/* ---------- Respect visitors who ask for less motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .plasma,
  .sparks {
    display: none;
  }
}
