/* Hand-written additions on top of the compiled Tailwind build (site.css). */

/* ---- Homepage KeyEngine hero: installer palette + slow ambient glow ---- */
.ke-hero {
  background: #110f1b;
  isolation: isolate;
}
.ke-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  /* faint lift towards the centre, like the installer window */
  background: radial-gradient(ellipse 70% 60% at 50% 45%, rgb(30 30 48 / 0.55), transparent 70%);
}
.ke-hero-bg span {
  --s: clamp(420px, 80vw, 1100px);
  position: absolute;
  width: var(--s);
  aspect-ratio: 1;
  border-radius: 50%;
  will-change: transform, opacity;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}
/* top right: rose <-> magenta-pink */
/* offsets are fractions of the glow's own size, so each glow hugs its corner at any card shape */
.ke-glow-tr-a, .ke-glow-tr-b { top: calc(var(--s) * -0.23); right: calc(var(--s) * -0.37); }
.ke-glow-tr-a {
  background: radial-gradient(closest-side, rgb(240 120 175 / 0.11), rgb(240 120 175 / 0.04) 55%, transparent);
  animation-name: ke-drift-tr, ke-fade-a;
  animation-duration: 26s, 19s;
}
.ke-glow-tr-b {
  background: radial-gradient(closest-side, rgb(205 110 225 / 0.10), rgb(205 110 225 / 0.035) 55%, transparent);
  animation-name: ke-drift-tr, ke-fade-b;
  animation-duration: 31s, 19s;
  animation-delay: -9s, 0s;
}
/* bottom left: violet <-> periwinkle */
.ke-glow-bl-a, .ke-glow-bl-b { bottom: calc(var(--s) * -0.23); left: calc(var(--s) * -0.37); }
.ke-glow-bl-a {
  background: radial-gradient(closest-side, rgb(120 105 245 / 0.11), rgb(120 105 245 / 0.04) 55%, transparent);
  animation-name: ke-drift-bl, ke-fade-a;
  animation-duration: 29s, 23s;
}
.ke-glow-bl-b {
  background: radial-gradient(closest-side, rgb(150 175 250 / 0.09), rgb(150 175 250 / 0.03) 55%, transparent);
  animation-name: ke-drift-bl, ke-fade-b;
  animation-duration: 35s, 23s;
  animation-delay: -12s, 0s;
}
@keyframes ke-drift-tr {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-6%, 5%) scale(1.12); }
  100% { transform: translate(3%, 9%) scale(0.94); }
}
@keyframes ke-drift-bl {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(6%, -5%) scale(1.1); }
  100% { transform: translate(-3%, -8%) scale(0.95); }
}
/* the two layers per corner cross-fade, so the colour slowly shifts */
@keyframes ke-fade-a { 0% { opacity: 1; } 100% { opacity: 0.25; } }
@keyframes ke-fade-b { 0% { opacity: 0.2; } 100% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .ke-hero-bg span { animation: none; }
}

/* whole-page variant (KeyEngine page): glows pinned to the viewport corners while scrolling */
.ke-hero-bg.ke-fixed { position: fixed; }

/* installer-style button: pink -> periwinkle */
.ke-btn {
  color: #1e1b4b;
  background-image: linear-gradient(90deg, #f0abc7 0%, #dcbde1 50%, #c9cffa 100%);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.4) inset, 0 6px 36px -8px rgb(226 150 205 / 0.55);
}

/* ---- Kawaii Vox page: compact header + alternating feature rows ---- */
.kv-header { padding-top: 4rem; padding-bottom: 3rem; }
@media (min-width: 640px) { .kv-header { padding-top: 6rem; padding-bottom: 3.5rem; } }
.kv-banner {
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: clamp(1.25rem, 3vw, 2rem);
  background: var(--color-ink-panel);
  aspect-ratio: 2000 / 1024;
  box-shadow: 0 30px 80px -30px rgb(0 0 0 / 0.75), 0 0 80px -30px rgb(226 150 205 / 0.25);
}
.kv-banner img { display: block; width: 100%; height: 100%; object-fit: cover; }
.kv-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 3rem;
}
.kv-features { padding: clamp(5rem, 10vw, 8rem) 0 clamp(2rem, 4vw, 3rem); }
.kv-features-title {
  margin: 0 auto;
  max-width: 18ch;
  text-align: center;
  text-wrap: balance;
  color: var(--color-chalk);
  font-size: clamp(2.25rem, 4.6vw, 3.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
}
/* Rows follow the Output "Portal" layout: two equal halves, media fills one half,
   copy sits centred in the other; sides alternate from tablet width up.
   On phones each row stacks media first, then copy. */
.kv-rows {
  display: grid;
  gap: clamp(4.5rem, 9vw, 7.5rem);
  max-width: 68rem;
  margin: clamp(3.5rem, 7vw, 5.5rem) auto 0;
}
.kv-row { display: grid; gap: 1.75rem; align-items: center; }
.kv-copy { justify-self: center; width: 100%; max-width: 22rem; }
@media (min-width: 700px) {
  .kv-row { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .kv-row.kv-text-left .kv-copy { order: -1; }
}
.kv-copy h3 {
  color: var(--color-chalk);
  font-size: clamp(1.5rem, 2.3vw, 1.85rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.kv-copy p {
  margin-top: 0.9rem;
  color: var(--color-fog);
  font-size: 1rem;
  line-height: 1.65;
  text-wrap: pretty;
}
.kv-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: 2rem;
  background: var(--color-ink-panel);
  box-shadow: 0 30px 80px -30px rgb(0 0 0 / 0.75), 0 0 60px -20px rgb(226 150 205 / 0.18);
}
.kv-media video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- KeyEngine page: installer palette swapped into the site's colour tokens ---- */
.ke-page {
  --color-ink: #110f1b;
  --color-ink-raised: #171522;
  --color-ink-panel: #1c1a2a;
  --color-line-soft: #242132;
  --color-line: #322e44;
  --color-gold: #f0abc7;
  --color-gold-bright: #f7c6da;
}
