:root {
  --bg: #050b1a;
  --text: #f4f6f3;
  --muted: #b9c4bf;
  --accent-top: #1d5cff;      /* bright true blue — 5.2:1 with white text */
  --accent-bottom: #3a5fa8;   /* slightly grayish blue — 6.2:1 with white text */
  --focus: #8fb8ff;
  --line: rgba(255, 255, 255, 0.22);
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--text);
  background-color: var(--bg);
  position: relative;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* Blurred background photo, fixed behind content (pseudo-element avoids iOS fixed-bg bugs) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: var(--bg);
  background-image:
    linear-gradient(180deg, rgba(4, 8, 20, 0.45) 0%, rgba(4, 8, 20, 0.32) 50%, rgba(4, 8, 20, 0.55) 100%),
    url("/bg-blur.jpg");
  background-image:
    linear-gradient(180deg, rgba(4, 8, 20, 0.45) 0%, rgba(4, 8, 20, 0.32) 50%, rgba(4, 8, 20, 0.55) 100%),
    image-set(url("/bg-blur.webp") type("image/webp"), url("/bg-blur.jpg") type("image/jpeg"));
  background-size: cover;
  background-position: center 60%;
  background-repeat: no-repeat;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  padding: 0.6rem 1rem;
  background: var(--text);
  color: var(--bg);
  border-radius: 8px;
  font-weight: 600;
  z-index: 10;
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding:
    max(2.5rem, env(safe-area-inset-top))
    max(1.5rem, env(safe-area-inset-right))
    max(1.75rem, env(safe-area-inset-bottom))
    max(1.5rem, env(safe-area-inset-left));
}

.content {
  flex: 1;
  width: 100%;
  max-width: 40rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 0 3rem;
}

.logo { margin: 0 0 2.75rem; line-height: 0; }
.logo img {
  display: block;
  width: min(22rem, 78vw);
  height: auto;
}

.headline {
  margin: 0 0 1rem;
  font-size: clamp(1.6rem, 1.1rem + 2.2vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.lede {
  margin: 0 0 2.5rem;
  max-width: 34rem;
  font-size: clamp(1.0625rem, 0.98rem + 0.4vw, 1.25rem);
  color: #dfe5e1;
  text-wrap: pretty;
}

.actions {
  width: 100%;
  max-width: 23rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.25rem;
}

a { color: inherit; }

a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 10px;
}

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.85rem 1.5rem;
  background: linear-gradient(180deg, var(--accent-top) 0%, var(--accent-bottom) 100%);
  color: #fff;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-radius: 12px;
  box-shadow: 0 10px 28px -12px rgba(29, 92, 255, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition: filter 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 14px 32px -12px rgba(29, 92, 255, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-primary:active { transform: translateY(0); }

.secondary {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0;
}

.link-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;          /* 44px touch target */
  padding: 0.5rem 0.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  transition: text-decoration-color 160ms ease, color 160ms ease;
}
.link-secondary:hover { text-decoration-color: currentColor; }
.icon { flex-shrink: 0; opacity: 0.9; }

.footer {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
}

.copyright {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

/* Reserved for the future Event Connection link (rendered only once enabled in index.html) */
.link-event {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 5px;
}
.link-event:hover { color: var(--text); text-decoration-color: currentColor; }

/* Narrow phones: stack the secondary links, centered */
@media (max-width: 26rem) {
  .secondary {
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
  }
  .logo { margin-bottom: 2.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .btn-primary:hover { transform: none; }
}

@media (forced-colors: active) {
  .btn-primary { border: 2px solid ButtonText; }
}
