/* Riftcord — shared styles
   Retheme by editing the custom properties below. */

:root {
  --bg: #0a0f0d;
  --surface: #121917;
  --border: #1f2b27;
  --fg: #f2f7f5;
  --muted: #8a9a93;
  --accent: #35d499;
  --accent-deep: #176648;
  --gradient: linear-gradient(135deg, #35d499, #176648);

  --font: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --measure: 42rem;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--muted);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  text-underline-offset: 0.25em;
}

a:hover {
  text-decoration-color: var(--accent);
}

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

/* --- motion -------------------------------------------------------------- */

/* Entrance keyframes never set opacity on the base rule, only here. That way
   disabling animation (reduced motion) leaves everything visible rather than
   stranded at opacity 0. `both` fill mode holds the from-state during delay. */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

@keyframes breathe {
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

/* --- landing ------------------------------------------------------------ */

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  padding: 5rem 1.5rem 3rem;
  text-align: center;
}

.mark {
  position: relative;
  height: 96px;
  animation: rise 0.6s ease-out both;
}

/* soft green glow behind the shield — breathes forever once the entrance has
   settled. Starts at 0.75 so the midpoint keyframe reads as a swell. */
.mark::before {
  content: "";
  position: absolute;
  inset: -60%;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--accent) 22%, transparent) 0%,
    transparent 70%
  );
  z-index: -1;
  opacity: 0.75;
  animation: breathe 6s ease-in-out 0.6s infinite;
}

.mark img {
  height: 100%;
  width: auto;
  display: block;
}

.wordmark {
  margin: 0;
  font-size: clamp(3rem, 12vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rise 0.6s ease-out 0.09s both;
}

.tagline {
  margin: 0;
  max-width: 34ch;
  font-size: 1.0625rem;
  animation: rise 0.6s ease-out 0.18s both;
}

/* --- legal pages -------------------------------------------------------- */

.topbar {
  padding: 2rem 1.5rem 0;
}

.topbar-inner,
.page {
  max-width: var(--measure);
  margin: 0 auto;
}

.topbar a {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--fg);
  text-decoration: none;
}

.topbar a:hover {
  color: var(--accent);
}

.page {
  flex: 1;
  width: 100%;
  padding: 3rem 1.5rem 4rem;
}

.page h1 {
  margin: 0;
  color: var(--fg);
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.page h2 {
  margin: 2.5rem 0 0.75rem;
  color: var(--fg);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.page h3 {
  margin: 1.75rem 0 0.5rem;
  color: var(--fg);
  font-size: 1rem;
  font-weight: 600;
}

.page p {
  margin: 0 0 1rem;
}

.page ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.page li {
  margin-bottom: 0.5rem;
}

/* body copy is --muted, so the only way a key term stands out is to lift it to
   --fg; bold alone is near-invisible against this background */
.page strong {
  color: var(--fg);
  font-weight: 600;
}

.updated {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: color-mix(in srgb, var(--muted) 75%, transparent);
}

/* scoped to .page so it outweighs `.page p` — the callout is itself a <p>, and
   the plain-paragraph margin would otherwise flatten it against the heading */
.page .notice {
  margin: 2rem 0 0;
  padding: 1rem 1.25rem;
  border: 1px dashed var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  background: var(--surface);
  font-size: 0.9375rem;
}

.notice strong {
  color: var(--fg);
}

/* --- footer ------------------------------------------------------------- */

.site-footer {
  padding: 2rem 1.5rem 2.5rem;
  text-align: center;
  font-size: 0.875rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.site-footer .sep {
  color: var(--border);
}

.site-footer .copyright {
  max-width: 34rem;
  margin: 0.75rem auto 0;
  color: color-mix(in srgb, var(--muted) 70%, transparent);
  text-wrap: balance;
}

/* the footer nav's separator sits between bright links; this one sits in dim
   body text, so it needs to inherit rather than use the border colour */
.site-footer .copyright .sep {
  color: inherit;
  opacity: 0.55;
}

/* only the landing page's footer joins the entrance stagger; on the legal
   pages a lone fading footer would read as a glitch */
.hero ~ .site-footer {
  animation: fade 0.6s ease-out 0.3s both;
}

/* --- preferences --------------------------------------------------------- */

/* No width breakpoints: the wordmark scales with clamp(), and every text block
   is capped by a ch/rem measure, so the layout adapts without one. */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
