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

html, body { height: 100%; }

html { margin: 0; padding: 0; }

body {
  margin: 0;
  padding: 0;
  line-height: 1.6;
  color: #111;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto,
               Helvetica, Arial, Verdana, "Apple Color Emoji",
               "Segoe UI Emoji", "Segoe UI Symbol";
}

/* ---------- Layout ---------- */
.container {
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;          /* moved content higher */
  align-items: center;
  text-align: center;
  padding: clamp(12px, 4vh, 40px) 1rem 2rem;  /* less top padding */
  gap: 0.5rem;
}

/* ---------- Typography ---------- */
h1 {
  margin: 0 0 0.1em;
  font-weight: 700;
  letter-spacing: 0.2px;
  font-size: clamp(2rem, 4vw + 1rem, 3.5rem);
}

.region {
  margin: 0;
  opacity: 0.85;
  font-weight: 600;
  color: #333;
  font-size: clamp(1.05rem, 1.6vw + 0.6rem, 1.35rem);
}

.tagline {
  margin: 0.1rem 0 0;
  opacity: 0.9;
  font-size: clamp(1.25rem, 2vw + 0.75rem, 2.25rem);
}

/* ---------- Header & Logo ---------- */
.site-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 2.5vw, 24px) 16px 0;
  margin-bottom: clamp(6px, 1.2vw, 12px);
}

.site-header img {
  display: block;
  width: min(90vw, 900px); /* retina-friendly scaling */
  height: auto;
  image-rendering: -webkit-optimize-contrast;
}

/* Lift the first section a touch under the header (reduced spacing) */
.site-header + * { margin-top: clamp(2px, 0.8vw, 8px) !important; }

/* ---------- Visually Hidden (keep for SEO/AT) ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Dark Mode ---------- */
@media (prefers-color-scheme: dark) {
  body { background: #0b0b0b; color: #f5f5f5; }
  .region { color: #e7e7e7; opacity: 0.95; }
  .tagline { opacity: 1; }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .container { animation: fadeIn 700ms ease-out both; }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Print ---------- */
@media print {
  .container { padding: 2rem 1rem; }
}
