/* This page was created with the help of Claude Fable 5 by Anthropic. */
/* site.css — shared styles for all Femtomino pages */

@font-face {
  font-family: "Pretendard Variable";
  src: url("/assets/fonts/PretendardVariable.woff2") format("woff2-variations");
  font-weight: 45 920;
  font-display: swap;
}

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

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--g0);
  color: var(--g4);
  font-family: var(--font-sans);
  font-size: var(--text-m);
  line-height: var(--leading-body);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

a {
  color: var(--accent);
}

/* --- Full-viewport centered stage --- */
.stage {
  min-height: 100dvh;
  display: grid;
  place-items: center;
}

/* --- Pages with a top header (hub and game pages) --- */
body.has-header {
  display: flex;
  flex-direction: column;
  align-items: center;
}

body.has-header .stage {
  flex: 1;
  width: 100%;
  min-height: 0;
}

.page-header {
  width: 100%;
  flex-shrink: 0;
  padding: var(--space-2) var(--space-4);
  padding-right: 64px; /* keep clear of the fixed theme toggle */
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  color: var(--g3);
  font-size: var(--text-l);
  text-decoration: none;
  transition: opacity var(--duration-fast) var(--ease);
}

.back-link:hover {
  opacity: 0.6;
}

.back-link svg {
  width: 20px;
  height: 20px;
}

/* --- Landing: the whole screen is one link to the portal --- */
.landing-link {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 100dvh;
  color: var(--g4);
  transition: opacity var(--duration-fast) var(--ease);
}

.landing-link:hover {
  opacity: 0.6;
}

.landing-logo {
  display: block;
  width: clamp(96px, 22vmin, 180px);
  height: auto;
  animation: fade-in var(--duration-base) var(--ease) both;
}

/* --- Portal icon grid --- */
.portal-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-8);
  animation: fade-in var(--duration-base) var(--ease) both;
}

.portal-item {
  display: grid;
  justify-items: center;
  gap: var(--space-3);
  min-width: 44px;
  padding: var(--space-3);
  color: var(--g4);
  text-decoration: none;
  transition: opacity var(--duration-fast) var(--ease);
}

.portal-item:hover {
  opacity: 0.6;
}

.portal-icon {
  display: block;
  width: clamp(56px, 12vmin, 80px);
  height: auto;
}

/* Label for items whose icon alone is not self-explanatory (e.g. game titles) */
.portal-label {
  font-size: var(--text-m);
  line-height: var(--leading-tight);
}

/* --- Theme toggle --- */
.theme-toggle {
  position: fixed;
  top: var(--space-2);
  right: var(--space-2);
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: none;
  background: none;
  color: var(--g3);
  font-size: var(--text-l);
  line-height: 1;
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease);
}

.theme-toggle:hover {
  color: var(--g4);
}

/* --- Stub (placeholder pages) --- */
.stub {
  display: grid;
  gap: var(--space-4);
  text-align: center;
  animation: fade-in var(--duration-base) var(--ease) both;
}

.stub p {
  margin: 0;
  color: var(--g3);
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
