/* ========================================
   Michael Plant — Design System
   ======================================== */

:root {
  /* Brand colors */
  --color-bg: #faf9f7;
  --color-bg-alt: #f0eeea;
  --color-text: #2c2c2c;
  --color-text-muted: #6b6b6b;
  --color-text-light: #999;
  --color-border: #e0ddd8;
  --color-link: #2c2c2c;
  --color-link-hover: #111;

  /* Context colors */
  --color-streetlight: #E8A825;
  --color-real-estate: #2B6CB0;
  --color-third-places: #4A8B6E;
  --color-building: #7B8FA1;

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;

  /* Shadows */
  --color-shadow: rgba(0, 0, 0, 0.06);

  /* Layout */
  --max-width: 720px;
  --max-width-wide: 1080px;
  --radius: 6px;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  animation: page-fade-in 400ms ease-out;
}

@keyframes page-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  body { animation: none; }
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }

p {
  margin-bottom: var(--space-sm);
}

a {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
}

a:hover {
  color: var(--color-link-hover);
}

ul, ol {
  padding-left: 1.3em;
  margin-bottom: var(--space-sm);
}

li {
  margin-bottom: 0.3em;
}

strong {
  font-weight: 600;
}

em {
  font-style: italic;
  color: var(--color-text-muted);
}

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-xl) 0;
}

/* Main content */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(48px + var(--space-lg) + var(--space-md)) var(--space-md) var(--space-lg);
  min-height: 60vh;
}

@media (max-width: 640px) {
  main {
    padding-top: calc(42px + var(--space-sm) + var(--space-xs));
  }
}

/* ========================================
   Name anchor — reorientation link
   To move left of beacon: change right → left,
   and set left: calc(40px + var(--space-md) + var(--space-sm))
   ======================================== */
.name-anchor {
  position: fixed;
  top: var(--space-md);
  right: max(var(--space-md), calc(50vw - 420px));
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-decoration: none;
  z-index: 200;
  letter-spacing: -0.01em;
  line-height: 48px;
}

.name-anchor:hover {
  color: var(--color-text);
}

@media (max-width: 640px) {
  .name-anchor {
    top: var(--space-xs);
    right: var(--space-xs);
    font-size: 0.78rem;
    line-height: 42px;
  }
}

/* ========================================
   Footer (utility only)
   ======================================== */
.site-footer {
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-2xl);
  padding: var(--space-md) var(--space-md);
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-text-light);
}

.site-footer a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.8rem;
}

.site-footer a:hover {
  color: var(--color-text);
}
