/* atheling.games. Colours and type come from tokens.css, generated from the design system. */
@import './fonts.css';
@import './tokens.css';

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* The same paper grain the game lays over its parchment. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

a { color: var(--foreground); text-decoration-color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--primary); text-decoration-color: currentColor; }

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
  font-variant-ligatures: common-ligatures discretionary-ligatures contextual;
}

p { margin: 0 0 1rem; }

/* Small-caps running heads, as in the game. Lowercased so the face sets them as small caps. */
.kicker {
  font-family: var(--font-caps);
  color: var(--muted-foreground);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  display: block;
}

.page {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border);
  margin-bottom: 3rem;
}

.masthead .wordmark {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.5rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.masthead .wordmark img { width: 34px; height: 34px; border-radius: var(--radius); border: 1.5px solid var(--border); }

.masthead nav { display: flex; gap: 1.25rem; font-size: 0.95rem; }

.hero { margin-bottom: 3.5rem; }
.hero h1 { font-size: clamp(2.6rem, 8vw, 4.5rem); margin: 0.25rem 0 1rem; }
.hero .lede { font-family: var(--font-serif); font-size: clamp(1.3rem, 3.4vw, 1.7rem); line-height: 1.35; max-width: 34rem; }
.hero .status {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.35rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  font-size: 0.9rem;
}

.campaigns { display: grid; gap: 1rem; margin: 0 0 3.5rem; padding: 0; list-style: none; }
.campaign {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  box-shadow: 3px 3px 0 var(--border);
}
.campaign h3 { font-size: 1.45rem; margin-bottom: 0.25rem; }
.campaign p { margin: 0; color: var(--muted-foreground); }
.campaign .kicker { margin-bottom: 0.35rem; }

.section { margin-bottom: 3rem; }
.section h2 { font-size: 2rem; margin-bottom: 0.75rem; }

.prose h2 { font-size: 1.6rem; margin: 2rem 0 0.5rem; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.4rem; }
.prose small { color: var(--muted-foreground); }

footer {
  border-top: 2px solid var(--border);
  padding-top: 1.25rem;
  margin-top: 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.9rem;
  color: var(--muted-foreground);
}
footer a { color: inherit; }
