@import url('/static/css/base.v1.css');

/* Keep legal pages aligned with hatch feed width */
.legal-content {
  max-width: 960px;
  margin: 0 auto;
}

/* Space for fixed home button */
.legal-content h1 {
  margin-top: 8px;
  margin-bottom: 18px;
}

/* Reuse hatch feed box feel */
.hatch-card {
  position: relative;
  isolation: isolate;
  display: block;
  padding: 14px;
  margin-bottom: 14px;
  border-radius: var(--radius-card);
  overflow: hidden;

  /* legal pages don't set --hatch-rgb, so use accent fallback */
  border: 1.5px solid rgba(100, 129, 166, 0.35);
  backdrop-filter: blur(6px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  background: var(--glass-bg);

  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.hatch-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(29, 32, 38, 0.28) 0%,
    rgba(29, 32, 38, 0.08) 100%
  );
  mix-blend-mode: screen;
}

.hatch-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.hatch-card > * {
  position: relative;
  z-index: 2;
}

.hatch-card:hover {
  transform: translateY(-3px);
  border-color: rgba(100, 129, 166, 0.75);
  box-shadow:
    0 0 20px rgba(100, 129, 166, 0.35),
    0 12px 28px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Typography inside legal cards */
.hatch-card strong {
  display: inline-block;
  margin-bottom: 4px;
  font-size: 1.05rem;
  letter-spacing: 0.2px;
}

.card-content {
  opacity: 0.92;
  font-size: 1rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* Link styling */
.card-content a,
.hatch-card a {
  color: #cfe2ff;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition-fast), text-shadow var(--transition-fast);
}

.card-content a:hover,
.hatch-card a:hover {
  color: #ffffff;
  text-shadow: 0 0 8px rgba(158, 184, 220, 0.45);
}

/* Fix accidental raw aside closers if present in markup flow */
.hatch-card aside {
  display: none;
}

/* Small-screen polish */
@media (max-width: 520px) {
  body {
    padding: 12px;
  }

  .legal-content h1 {
    margin-top: 4px;
    margin-bottom: 14px;
  }

  .hatch-card {
    padding: 12px;
    margin-bottom: 12px;
  }

  .card-content {
    font-size: 0.95rem;
    line-height: 1.45;
  }
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
  .hatch-card {
    transition: none;
  }

  .hatch-card:hover {
    transform: none;
  }
}
