/*
 * SPDX-FileCopyrightText: 2026 quissicutdeus
 *
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */

/*
 * The mica.gg landing page's whole stylesheet. Plain CSS, no framework, no
 * build step -- served exactly as written. Light/dark follows the visitor's
 * OS preference (`prefers-color-scheme`); there is no toggle and no
 * localStorage, since there is nothing here worth remembering between visits.
 *
 * No external request of any kind: no `@import`, no web font, no icon font.
 * The system font stack below is the only typeface this page uses.
 */

:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1c1b1f;
  --text-muted: #49454f;
  --accent: #5a4494;
  --accent-text: #ffffff;
  --border: #e2dfe8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141218;
    --surface: #1d1b20;
    --text: #e6e0e9;
    --text-muted: #cac4d0;
    --accent: #cdbdff;
    --accent-text: #34246e;
    --border: #322f37;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  line-height: 1.5;
}

main {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2rem;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

h1 {
  margin: 0;
  font-size: 2.5rem;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0;
  max-width: 34rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.license {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.button {
  display: inline-block;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}

.button:hover,
.button:focus-visible {
  border-color: var(--accent);
}

.button.primary {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}

/* The screenshot slider: wider than the text column, so the tablet reads at a
   useful size, and a fixed slide height so switching devices does not move the
   page. */
.gallery {
  width: min(56rem, calc(100vw - 2rem));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.gallery-tabs {
  display: inline-flex;
  padding: 0.25rem;
  gap: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

.gallery-tabs button {
  padding: 0.4rem 1.1rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.gallery-tabs button[aria-selected='true'] {
  background: var(--accent);
  color: var(--accent-text);
}

.gallery-tabs button:focus-visible,
.gallery-track:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.gallery-track {
  width: 100%;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  border-radius: 1.5rem;
}

.gallery-track::-webkit-scrollbar {
  display: none;
}

.slide {
  flex: 0 0 100%;
  margin: 0;
  height: 34rem;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: center;
}

.slide img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 1.5rem;
  border: 1px solid var(--border);
}

@media (prefers-reduced-motion: reduce) {
  .gallery-track {
    scroll-behavior: auto;
  }
}

/* Phone width: shrink the hero type and let the screenshot fill more of the
   viewport, rather than being crowded by the default 40rem column padding. */
@media (max-width: 30rem) {
  main {
    padding: 1.5rem 1rem 3rem;
    gap: 1.5rem;
  }

  h1 {
    font-size: 2rem;
  }

  .slide {
    height: 28rem;
  }
}
