/* Shared styles for index.html and legal.html */

:root {
  --bg1: #0b0c0f;
  --bg2: #101217;
  --text: #eee;
  --muted: rgba(255, 255, 255, 0.65);
  --pill: rgba(255, 255, 255, 0.08);
  --pillBorder: rgba(255, 255, 255, 0.12);
  --card: rgba(255, 255, 255, 0.07);
  --card2: rgba(255, 255, 255, 0.05);
  --cardBorder: rgba(255, 255, 255, 0.1);
  --shadow: 0 16px 20px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial;
  color: var(--text);
  background-color: var(--bg2);
  background-image:
    radial-gradient(
      1000px 600px at 70% 20%,
      rgba(255, 255, 255, 0.06),
      transparent 60%
    ),
    linear-gradient(160deg, rgba(11, 12, 15, 0.96), rgba(16, 18, 23, 0.96)),
    url("background.jpg");
  background-size: auto, auto, cover;
  background-position: center, center, center;
  background-repeat: no-repeat;
  background-attachment: scroll, scroll, fixed;
}

.wrap {
  display: flex;
  justify-content: center;
  padding: 48px 16px;
}

.container {
  width: 100%;
}

/* Page-specific layout */
.page--home .wrap {
  padding: 48px 16px 130px;
}

.page--home .container {
  max-width: 560px;
  text-align: center;
}

.page--legal .container {
  max-width: 860px;
}

/* Shared surfaces */
.card {
  border-radius: 22px;
  background: linear-gradient(180deg, var(--card), var(--card2));
  border: 1px solid var(--cardBorder);
  box-shadow: var(--shadow);
}

/* Shared visually-hidden text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Buttons / chips (merged rules) */
.pill,
.back {
  color: #eee;
  text-decoration: none;
  font-weight: 650;
  font-size: 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
  transform-origin: center;
}

.pill {
  padding: 10px 10px;
  background: var(--pill);
  border-color: var(--pillBorder);
}

.pill svg {
  width: 16px;
  height: 16px;
  display: block;
  flex: 0 0 auto;
}

.pill:hover,
.pill:focus-visible,
.back:hover,
.back:focus-visible {
  transform: scale(1.06);
}

.back {
  background: rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

/* Make the back button a touch subtler than pills */
.back:hover,
.back:focus-visible {
  transform: scale(1.05);
}

/* Home page */
.page--home .avatar {
  width: 92px;
  height: 92px;
  margin: 0 auto 18px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.page--home .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page--home h1 {
  font-size: clamp(24px, 4.6vw, 40px);
  margin: 0 0 10px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.page--home .subtitle {
  font-size: 16px;
  font-weight: 400;
  margin: 0 0 28px !important;
}

.page--home .pills {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.page--home .links {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.page--home .card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  text-decoration: none;
  color: #eee;
  text-align: left;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
  transform-origin: center;
}

.page--home .card:hover,
.page--home .card:focus-visible {
  transform: scale(1.02);
}

.page--home .icon {
  width: 44px;
  height: 44px;
  font-size: 22px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.page--home .title {
  font-size: 16px;
  font-weight: 750;
  margin: 0 0 4px;
}

.page--home .sub {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

.page--home .footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 10px;
  z-index: 10;
  padding: 14px 16px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  text-align: center;
}

.page--home .footer a {
  color: inherit;
  text-decoration: underline;
}

.page--home .legal {
  margin-top: 10px;
}

/* Legal page */
.page--legal .header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.page--legal h1 {
  margin: 0;
  font-size: clamp(22px, 3.8vw, 34px);
  font-weight: 750;
  letter-spacing: -0.02em;
}

.page--legal .wrap {
  padding: 48px 16px;
}

.page--legal .card {
  padding: 18px;
}

.page--legal h2 {
  margin: 18px 0 8px;
  font-size: 18px;
  font-weight: 750;
}

.page--legal h3 {
  margin: 14px 0 6px;
  font-size: 15px;
  font-weight: 750;
  color: rgba(255, 255, 255, 0.9);
}

.page--legal p,
.page--legal li {
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}

.page--legal ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.page--legal code {
  color: rgba(255, 255, 255, 0.85);
}

@media (prefers-reduced-motion: reduce) {
  .pill,
  .back,
  .page--home .card {
    transition: none;
  }

  .pill:hover,
  .pill:focus-visible,
  .back:hover,
  .back:focus-visible,
  .page--home .card:hover,
  .page--home .card:focus-visible {
    transform: none;
  }
}
