/*
 * Design tokens and page skeleton.
 * Every colour used anywhere on the site is defined here once.
 * The daytime module only overrides the --sky-* and --light-* tokens.
 */

:root {
  /* Palette */
  --baltic-blue: #2e6f8e;
  --moss-green: #5b7f4a;
  --rock-grey: #8a8f99;
  --honey-yellow: #e8b33a;
  --cream: #f6f1e7;
  --ink: #2b2a27;
  --ink-soft: #6b665d;

  /* Daytime tokens (defaults = day). See daytime.css. */
  --sky-top: #a9d3ea;
  --sky-bottom: #e8f1f6;
  --light-tint: transparent;
  --shadow-strength: 0.12;

  /* Typography */
  --font-body: "Nunito", "Segoe UI", system-ui, sans-serif;
  --font-display: "Fredoka", "Nunito", system-ui, sans-serif;

  /* Layout */
  --max-width: 1200px;
  --gutter: 16px;
  --radius: 14px;

  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Accessibility helpers */
.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  background: var(--honey-yellow);
  color: var(--ink);
  padding: 8px 12px;
  border-radius: var(--radius);
  z-index: 100;
}
.skip-link:focus {
  top: var(--gutter);
}

:focus-visible {
  outline: 3px solid var(--honey-yellow);
  outline-offset: 3px;
}

/*
 * Layout: the picture is fixed and fills the viewport (see landscape.css).
 * Everything else floats above it: the title in the sky, the project cards
 * on the sea, the footer below them. The page scrolls only if the cards need
 * more room than the sea offers.
 */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 24px var(--gutter);
  pointer-events: none;
}

.site-header a,
.site-title {
  pointer-events: auto;
}

.site-title {
  margin: 0;
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: 0.01em;
  color: var(--ink);
  background: rgba(246, 241, 231, 0.82);
  padding: 6px 14px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

/* Pushes the cards down to the sea. Tuned per picture in landscape.css. */
.hero-space {
  height: var(--hero-space, 62vh);
}

.site-footer {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px var(--gutter) 24px;
  font-size: 0.875rem;
}
body.cards-in-world .site-footer {
  position: fixed;
  left: 0;
  bottom: 0;
  margin: 0;
  padding: 12px var(--gutter);
}
.site-footer a {
  color: var(--cream);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  margin-right: 16px;
}
