/* Trace game page — the game's own palette and type over the Haysopht base (site.css). */

@font-face {
  font-family: 'Oxanium';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(/assets/fonts/oxanium-variable.woff2) format('woff2');
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/dm-mono-400.woff2) format('woff2');
}

/* Re-point the site tokens so the shared footer and links take the game's colours. */
.trace {
  --ground: #05080C;
  --panel: #0A0E13;
  --rule: #16242F;
  --rim: #314656;
  --flare: #21E6FF;
  --flare-hover: #8FF6FF;
  --bone: #EAF6FF;
  --body: #A9BBC9;
  --muted: #8096A8;
  --strike: #21E6FF;
  --pivot: #FFB020;
  --primer: #B06CFF;
  --shell: #2BF5A0;
  --sustain: #E8ECFF;
  --kraken: #8F8DFF;
  --gold: #FFD400;
  --display: 'Oxanium', sans-serif;
  --mono: 'DM Mono', monospace;
}

.trace body { overflow-x: hidden; }

.t-wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}

.t-label {
  margin: 0;
  font: 400 12px/1.4 var(--mono);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}

.t-dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--flare);
  box-shadow: 0 0 10px var(--flare);
  animation: tr-pulse 2.4s ease-in-out infinite;
}

/* ---------- Top bar ---------- */

.t-top {
  padding-top: 28px;
  padding-bottom: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: center;
  justify-content: space-between;
}

.t-top__home {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font: 400 12px/1 var(--mono);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}
.t-top__home:hover { color: var(--bone); }
.t-top__home .reticle { color: currentColor; }

.t-top__status { display: flex; align-items: center; gap: 10px; }

/* ---------- Hero ---------- */

.t-hero {
  padding-top: 32px;
  padding-bottom: 96px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px 64px;
}

.t-hero__copy {
  flex: 1 1 440px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.t-hero__modes {
  display: flex;
  align-items: center;
  gap: 16px;
  letter-spacing: .26em;
  animation: tr-rise .8s ease-out both;
}
.t-hero__modes::before {
  content: '';
  flex: none;
  width: 40px;
  height: 2px;
  background: var(--flare);
}

.t-hero__title {
  margin: 0 -.2em 0 0;
  font: 300 clamp(64px, 15vw, 168px)/.9 var(--display);
  letter-spacing: .2em;
  color: var(--flare);
  text-shadow: 0 0 28px rgba(33, 230, 255, .55), 0 0 2px rgba(33, 230, 255, .9);
  animation: tr-wipe 1s cubic-bezier(.3, .8, .2, 1) .15s both;
}

.t-hero__tagline {
  margin: 0;
  font: 700 clamp(24px, 3.2vw, 34px)/1.15 var(--display);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--bone);
  animation: tr-rise .8s ease-out .5s both;
}
.t-hero__tagline span { color: var(--flare); }

.t-hero__pitch {
  margin: 0;
  max-width: 46ch;
  font: 400 18px/1.65 var(--sans);
  color: var(--body);
  text-wrap: pretty;
  animation: tr-rise .8s ease-out .65s both;
}

.t-hero__status {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  animation: tr-rise .8s ease-out .8s both;
}

/* Google's official badge, shown as supplied. */
.t-play {
  display: block;
  flex: none;
  border-radius: 10px;
  transition: transform .2s, filter .2s;
}
.t-play img { display: block; width: auto; height: 60px; }
.t-play:hover { transform: translateY(-2px); filter: drop-shadow(0 0 18px rgba(33, 230, 255, .35)); }
.t-play:focus-visible { outline-offset: 6px; }

.t-hero__where { line-height: 1.5; letter-spacing: .2em; }

.t-hero__art {
  flex: 1 1 360px;
  min-width: 0;
  display: flex;
  justify-content: center;
}
/* The screenshot's edges fade out so its ground runs into the page's. */
.t-hero__art img {
  display: block;
  width: 100%;
  max-width: 600px;
  height: auto;
  aspect-ratio: 1 / 1;
  -webkit-mask-image: radial-gradient(circle closest-side, #000 76%, transparent 100%);
  mask-image: radial-gradient(circle closest-side, #000 76%, transparent 100%);
  animation: tr-zoom 1.4s cubic-bezier(.2, .8, .2, 1) .2s both;
}

/* ---------- Facts strip ---------- */

.t-facts { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.t-facts ul {
  margin: 0 auto;
  padding-top: 26px;
  padding-bottom: 26px;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 56px;
}
.t-facts b { font-weight: 400; color: var(--bone); }
.t-facts span::before { content: ' · '; white-space: pre; }

/* ---------- Sections ---------- */

.t-section {
  padding-top: 104px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.t-section__head { display: flex; flex-direction: column; gap: 18px; }

.t-h2 {
  margin: 0;
  font: 700 clamp(32px, 4.8vw, 54px)/1.05 var(--display);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--bone);
}
.t-h2 span { color: var(--shell); text-shadow: 0 0 22px rgba(43, 245, 160, .4); }

.t-lede {
  margin: 0;
  max-width: 52ch;
  font: 400 18px/1.65 var(--sans);
  color: var(--body);
  text-wrap: pretty;
}

/* ---------- Arcs ---------- */

.t-arcs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
}

.t-arc {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 20px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
@media (hover: hover) {
  .t-arc:hover {
    transform: translateY(-4px);
    border-color: var(--c);
    box-shadow: 0 0 30px color-mix(in srgb, var(--c) 20%, transparent);
  }
  .t-arc:hover svg { transform: scale(1.06); }
}
.t-arc svg {
  display: block;
  overflow: visible;
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--c) 55%, transparent));
  transition: transform .25s ease;
}
.t-arc h3 {
  margin: 8px 0 0;
  font: 400 14px/1.4 var(--mono);
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--c);
}
.t-arc p { margin: 0; font: 400 15px/1.6 var(--sans); color: var(--body); }

.t-arc--strike { --c: var(--strike); }
.t-arc--pivot { --c: var(--pivot); }
.t-arc--primer { --c: var(--primer); }
.t-arc--shell { --c: var(--shell); }
.t-arc--sustain { --c: var(--sustain); }
.t-arc--more {
  --c: var(--muted);
  background: none;
  border: 1px dashed var(--rim);
  justify-content: flex-end;
}
.t-arc--more h3 { margin: 0; color: var(--bone); }

/* ---------- Modes ---------- */

.t-section--modes { padding-top: 120px; }

.t-modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 40px 24px;
}

.t-mode { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.t-mode img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 14;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--rim);
  border-radius: 28px;
  background: var(--panel);
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
@media (hover: hover) {
  .t-mode:hover img {
    transform: translateY(-6px);
    border-color: var(--flare);
    box-shadow: 0 20px 56px rgba(33, 230, 255, .14);
  }
}
.t-mode .t-label { margin-top: 10px; letter-spacing: .26em; }
.t-mode h3 {
  margin: 0;
  font: 700 24px/1.15 var(--display);
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--bone);
}
.t-mode h3 span { display: block; color: var(--c, var(--flare)); }
.t-mode p:last-child { margin: 0; font: 400 15px/1.6 var(--sans); color: var(--body); }
.t-mode--dungeon { --c: var(--kraken); }
.t-mode--customize { --c: var(--gold); }

/* ---------- Closing ---------- */

.t-close {
  position: relative;
  margin-top: 128px;
  border-top: 1px solid var(--rule);
  overflow: hidden;
}
.t-close::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 100%, rgba(33, 230, 255, .12), rgba(33, 230, 255, 0) 60%);
  animation: tr-breathe 5s ease-in-out infinite;
}
.t-close__inner {
  position: relative;
  padding-top: 112px;
  padding-bottom: 112px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}
.t-close__mark { display: block; overflow: visible; }
.t-close__mark .glow { filter: drop-shadow(0 0 5px rgba(33, 230, 255, .8)); }
.t-close__title {
  margin: 0 -.16em 0 0;
  font: 300 clamp(36px, 7vw, 76px)/1 var(--display);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--flare);
  text-shadow: 0 0 24px rgba(33, 230, 255, .5);
}
.t-close__text {
  margin: 0;
  max-width: 46ch;
  font: 400 17px/1.65 var(--sans);
  color: var(--body);
  text-wrap: pretty;
}

/* ---------- Motion ---------- */

@keyframes tr-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes tr-breathe { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }
@keyframes tr-wipe { from { clip-path: inset(-40px 100% -40px -40px); } to { clip-path: inset(-40px); } }
@keyframes tr-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes tr-zoom { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }

/* Sections rise in as they scroll into view, where the browser can drive an animation by scroll. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .t-reveal {
      animation: tr-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 40%;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .t-arc, .t-arc svg, .t-mode img, .t-play { transition: none; }
  .t-play:hover { transform: none; }
}

/* ---------- Narrow screens ---------- */

/* Once the hero stacks it takes the game's title screen: the ring, the wordmark under it, centred. */
@media (max-width: 927px) {
  .t-hero { flex-direction: column; gap: 8px; padding-top: 0; padding-bottom: 72px; }
  .t-hero__copy { flex: none; width: 100%; align-items: center; gap: 22px; text-align: center; }
  .t-hero__art { flex: none; order: -1; width: 100%; }
  .t-hero__art img { max-width: min(78vw, 420px); }
  .t-hero__modes::before { content: none; }
  .t-hero__title { margin-right: -.2em; font-size: clamp(56px, 19vw, 132px); }
  .t-hero__tagline span { display: block; }
  .t-hero__status { flex-direction: column; margin-top: 4px; }
}

@media (max-width: 640px) {
  .t-wrap { padding-left: 20px; padding-right: 20px; }

  .t-top { padding-top: 14px; padding-bottom: 6px; }

  .t-hero__pitch { font-size: 16px; }

  .t-facts ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 16px; }
  .t-facts b, .t-facts span { display: block; }
  .t-facts span { margin-top: 6px; font-size: 11px; letter-spacing: .14em; }
  .t-facts span::before { content: none; }

  .t-section { padding-top: 72px; gap: 32px; }
  .t-lede { font-size: 16px; }

  .t-arcs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .t-arc { padding: 20px 16px; gap: 10px; border-radius: 16px; }
  .t-arc svg { width: 96px; height: auto; }
  .t-arc h3 { font-size: 13px; letter-spacing: .2em; }
  .t-arc p { font-size: 14px; line-height: 1.5; }

  /* The modes become a row to swipe through, the next one showing at the edge. */
  .t-section--modes { padding-top: 80px; }
  .t-modes {
    display: flex;
    gap: 16px;
    margin: 0 -20px;
    padding: 0 20px 4px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 20px;
    scrollbar-width: none;
  }
  .t-modes::-webkit-scrollbar { display: none; }
  .t-mode { flex: 0 0 76%; scroll-snap-align: start; animation: none; }
  .t-mode img { border-radius: 22px; }

  .t-close { margin-top: 80px; }
  .t-close__inner { padding-top: 80px; padding-bottom: 80px; }
  .t-close__text { font-size: 16px; }
}

/* ---------- Privacy policy (/trace/privacy/) ---------- */

.t-eyebrow { display: flex; align-items: center; gap: 16px; letter-spacing: .26em; }
.t-eyebrow::before {
  content: '';
  flex: none;
  width: 40px;
  height: 2px;
  background: var(--flare);
}

.t-policy-head {
  padding-top: 40px;
  padding-bottom: 64px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.t-policy-head__title {
  margin: 0;
  font: 700 clamp(34px, 6vw, 64px)/1.05 var(--display);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--bone);
}
.t-policy-head__title span { color: var(--flare); text-shadow: 0 0 22px rgba(33, 230, 255, .45); }

.t-policy { flex: 1; border-top: 1px solid var(--rule); }

.t-policy__inner {
  padding-top: 64px;
  padding-bottom: 112px;
  display: flex;
  align-items: flex-start;
  gap: 72px;
}

/* The contents list keeps its place beside the text; narrow screens go straight to the policy. */
.t-toc {
  flex: none;
  width: 220px;
  position: sticky;
  top: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font: 400 12px/1.4 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.t-toc__title { margin: 0 0 6px; letter-spacing: .26em; color: var(--bone); }
.t-toc a { color: var(--muted); }
.t-toc a:hover { color: var(--bone); }

.t-prose {
  flex: 1;
  min-width: 0;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 44px;
  font: 400 17px/1.65 var(--sans);
  color: var(--body);
  text-wrap: pretty;
  overflow-wrap: anywhere;
}
.t-prose section { display: flex; flex-direction: column; gap: 12px; }
.t-prose h2 {
  margin: 0;
  scroll-margin-top: 24px;
  font: 700 21px/1.25 var(--display);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--bone);
}
.t-prose p { margin: 0; }

.t-prose .t-brief {
  padding: 28px;
  border: 1px solid rgba(33, 230, 255, .4);
  border-radius: 20px;
  background: #06161C;
  box-shadow: 0 0 32px rgba(33, 230, 255, .1);
}
.t-prose .t-brief h2 {
  font: 400 13px/1.4 var(--mono);
  letter-spacing: .26em;
  color: var(--flare);
}
.t-brief p { color: var(--bone); }

@media (max-width: 927px) {
  .t-toc { display: none; }
}

@media (max-width: 640px) {
  .t-policy-head { padding-top: 24px; padding-bottom: 40px; gap: 18px; }
  .t-policy__inner { padding-top: 40px; padding-bottom: 72px; }
  .t-prose { gap: 36px; font-size: 16px; }
  .t-prose h2 { font-size: 19px; }
  .t-prose .t-brief { padding: 22px 20px; border-radius: 16px; }
}
