﻿/*
  Look of the AUTOTROPH GAMES particle-word preview.
  What it does: a near-black full-screen stage, white dots (drawn by particles.js on the
  canvas), and a small amount of crisp text in the corners. The one accent colour is
  Brand Green, used for the pointer and for anything the pointer touches.
  How to change the green: edit --brand-green below AND the matching GREEN value at
  the top of particles.js (the canvas cannot read this file).
  Depends on: index.html for the element names used here.
*/

:root {
  --night: #050807;          /* page background, a black with a trace of green */
  --white: #f6f8f5;          /* lettering */
  --dim: rgba(246, 248, 245, .56);   /* quiet supporting text */
  --brand-green: #58d68d;  /* the pointer and every "touched" highlight */
  --face: "Avenir Next", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; background: var(--night); color: var(--white); font-family: var(--face); }

/* The stage fills the screen and never scrolls; everything is layered inside it. */
.stage { position: fixed; inset: 0; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }

/* Hide the normal arrow only on devices with a real mouse, where the green pointer replaces it. */
@media (hover: hover) and (pointer: fine) {
  .stage.live, .stage.live a, .stage.live button { cursor: none; }
}

#field { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* Corner text: logo and phone on top, tagline and hint on the bottom. */
.corner { position: absolute; left: 0; right: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: clamp(16px, 3vw, 34px) clamp(18px, 4vw, 52px); }
.corner.top { top: 0; }
.corner.bottom { bottom: 0; align-items: flex-end; }

.mark { color: var(--white); display: inline-flex; transition: color .25s; }
.mark:hover { color: var(--brand-green); }

.contact { display: flex; align-items: center; gap: clamp(12px, 2vw, 26px); font-size: 14px; letter-spacing: .06em; }
.contact a { color: var(--white); text-decoration: none; transition: color .25s, border-color .25s; }
.contact a:hover { color: var(--brand-green); }
.pill { border: 1px solid rgba(246, 248, 245, .34); border-radius: 999px; padding: 10px 18px; }
.pill:hover { border-color: var(--brand-green); }

.tagline { margin: 0; font-size: clamp(13px, 1.2vw, 16px); letter-spacing: .22em; text-transform: uppercase; color: var(--dim); }

/* The hint is a real button so keyboard users can open the services without a mouse. */
.hint { background: none; border: 0; padding: 6px 0; color: var(--dim); font: inherit; font-size: 13px; letter-spacing: .08em; text-align: right; transition: color .25s; }
.hint:hover, .hint:focus-visible { color: var(--brand-green); }

/* The plain-text company name: invisible while the dots are running, shown if they cannot. */
.word-fallback { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; font-size: clamp(54px, 15vw, 240px); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; opacity: 0; pointer-events: none; }
.stage.static .word-fallback { opacity: 1; }

/* Service links. Each link is placed by particles.js right on top of its dotted name.
   The link's own letters start see-through; once the dots have gathered, a faint solid
   copy of the name settles in underneath so it always reads clearly. */
.services { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.services[hidden] { display: none; }
.service { position: absolute; display: block; color: transparent; text-decoration: none; font-weight: 800; white-space: nowrap; line-height: 1; pointer-events: auto; border-radius: 6px; }
.service small { position: absolute; left: 0; top: 100%; margin-top: .5em; font-size: 13px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); opacity: 0; transform: translateY(6px); transition: opacity .6s .5s, transform .6s .5s, color .25s; }
.services.shown .service small { opacity: 1; transform: none; }
.services.shown .service { color: rgba(246, 248, 245, .34); transition: color .9s 1.3s; }
.services.shown .service:hover, .services.shown .service:focus-visible { color: rgba(88, 214, 141, .5); transition: color .25s; }
.service:hover small, .service:focus-visible small { color: var(--brand-green); }
.stage.static .service { color: var(--white); }

a:focus-visible, button:focus-visible { outline: 2px solid var(--brand-green); outline-offset: 6px; }

/* The green pointer: a solid dot, plus a ring that swells when it is over a link. */
.pointer { position: absolute; left: 0; top: 0; z-index: 4; width: 0; height: 0; pointer-events: none; opacity: 0; transition: opacity .3s; }
.pointer.on { opacity: 1; }
.pointer::before { content: ""; position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand-green); box-shadow: 0 0 18px 4px rgba(88, 214, 141, .65); }
.pointer i { position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(88, 214, 141, .55); transition: transform .25s, border-color .25s; }
.pointer.link i { transform: scale(1.7); border-color: var(--brand-green); }

/* Shown only when the browser has scripts turned off. */
.plain-links { position: fixed; left: 0; right: 0; bottom: 18%; z-index: 5; margin: 0; padding: 0 24px; list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; }
.plain-links a { color: var(--white); }

@media (max-width: 640px) {
  .contact a:first-child { display: none; }
  .corner.bottom { flex-direction: column; align-items: flex-start; gap: 6px; }
  .hint { text-align: left; }
  .service small { font-size: 11px; }
}
