/* ============================================================================
   DOCUMENT LAYER — loaded once by index.html.

   Single source of truth for the design tokens (the custom properties on
   :root below). Custom properties inherit through shadow boundaries, so
   every component picks them up from here — do NOT redeclare them anywhere.

   The semantic tokens (--bg, --surface, --fg, --fg-muted) flip in light
   mode; the legacy aliases (--wit, --zwart, …) reference them and flip
   automatically, so component rules stay scheme-agnostic.

   Element rules in this file can only style the light DOM of index.html
   (body, #app, the <main> wrapper, header-menu, footer-menu). They cannot
   reach inside components: shared component styles live in mainCSS.ts.
   ========================================================================== */

:root {
  color-scheme: light dark;

  /* Fixed palette — never flip */
  --gold:    #c7a86d;
  --silver:  #a3b7c0;
  --groen:   #398718;
  --blauw:   #00aaff;
  --warning-red:      #cf222e;
  --be_here_now_blue: #301987;

  /* Semantic tokens — dark mode defaults */
  --bg:       #0f0f0f;
  --surface:  #1a1a1a;
  --fg:       #f5f5f0;
  --fg-muted: rgba(245, 245, 240, 0.6);

  /* Legacy aliases — auto-flip because they reference --bg / --fg */
  --wit:             var(--fg);
  --zwart:           var(--bg);
  --background-dark: var(--bg);
  --background-light: #fdfcfb;

  /* Hover accent — lighter than --gold on dark, darker on light */
  --gold-hover: #f0d98d;

  /* Misc */
  --fullwidth:            100%;
  --transition:           all 0.6s ease;
  --transitionInSeconds:  all 0.6s ease;
  --logoTransitionInSeconds: 0.8s;
  --border:               2px solid var(--gold);

  /* Inter for body/UI; Cormorant Garamond carries display type via the
     component styles. Almost nobody has Adobe Garamond Pro locally, so
     the old serif stack rendered as Windows Garamond or Times. */
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1.0625em; /* 17px - Inter reads better a notch up */
  line-height: 1.6;    /* 1.3 was cramped; tight lines make sans text shimmer */
  font-weight: 400;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Light mode — only flip the semantic tokens; aliases update automatically.
   --gold darkens too: #c7a86d is ~1.9:1 on white and unreadable, #7a5f28
   passes WCAG AA on both --bg (~5.8:1) and --surface (~5.1:1) while
   keeping the bronze character. */
@media (prefers-color-scheme: light) {
  :root {
    --bg:       #fdfcfb;
    --surface:  #f0ede8;
    --fg:       #1a1a1a;
    --fg-muted: rgba(26, 26, 26, 0.6);
    --gold:     #7a5f28;
    --gold-hover: #63501f;
  }
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
}

body {
  display: grid;
  height: 100vh; /* use viewport height to make it full-screen height */
  font-family: inherit;
}

main {
  line-height: normal;
  flex-direction: column; /* Stack items vertically */
  justify-content: center; /* Center items horizontally */
  text-align: center;
}

#app {
  /* 100%, not 100vw: 100vw includes the scrollbar width, which pushed the
     whole page a few pixels off-centre and caused horizontal overflow. */
  width: 100%;
}

header-menu {
  z-index: 100;
  position: relative;
  border-bottom: 1px dotted var(--fg-muted);
  padding-bottom: 1rem;
  margin-bottom: 2rem;
  font-family: inherit;
}

@media (max-width: 952px) {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    line-height: normal;
  }

  footer-menu {
    width: 100%;
    height: 100%;
    font-size: 1rem;
    line-height: 1.5;
    letter-spacing: 0.02em;
  }
}
