/* ===========================================================
   PopWeb — shared stylesheet
   Zero third-party requests (fonts, trackers, CDNs) by design:
   this is a private, non-commercial service, and a self-contained
   site is the most private, fastest, and most secure option.
   =========================================================== */

/* Self-hosted Comfortaa (variable weight) — no third-party request */
@font-face {
  font-family: "Comfortaa";
  src: url("fonts/Comfortaa.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg:        #ffffff;
  --ink:       #2b2150;   /* deep blue-violet, used for error headings */
  --ink-soft:  #6b6480;   /* muted secondary text */
  --blue:      #0000ff;   /* original copyright-line blue */
  --accent:    #ff0000;   /* original red */
  --accent-2:  #007700;   /* original green */
  --rule:      #ece9f2;

  /* Comfortaa, self-hosted, with a graceful system fallback while it loads */
  --font-display: "Comfortaa", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:    "Comfortaa", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 4vh, 3rem);
  padding: clamp(2rem, 6vw, 4rem) 1.25rem;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  line-height: 1.6;
  text-align: center;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* --- Logo / hero ------------------------------------------------ */
picture { display: block; }
.logo {
  width: min(560px, 82vw);   /* enlarged from the old fixed 389px */
  height: auto;
  display: block;
  margin-inline: auto;       /* stay centred even when the tagline is wider */
  filter: drop-shadow(0 10px 30px rgba(120, 80, 200, 0.16));
  animation: rise 700ms cubic-bezier(.2, .7, .2, 1) both;
}

/* --- Headings & taglines --------------------------------------- */
.tagline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 1.1rem + 2.4vw, 2.6rem);
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--accent);
  animation: rise 700ms 90ms cubic-bezier(.2, .7, .2, 1) both;
}
.tagline .years {
  display: block;
  font-size: 1.35em;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* --- Error pages ------------------------------------------------ */
.error-code {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.5rem, 2rem + 9vw, 7rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--accent);
  margin: 0;
}
.error-msg {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.1rem, 0.9rem + 1.2vw, 1.5rem);
  margin: 0.25rem 0 0;
  color: var(--ink);
}
.home-link {
  display: inline-block;
  margin-top: 1.75rem;
  padding: 0.7rem 1.4rem;
  border: 1.5px solid var(--rule);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  transition: border-color .2s ease, transform .2s ease, color .2s ease;
}
.home-link:hover,
.home-link:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

/* --- Footer / legal -------------------------------------------- */
.legal {
  /* font scales with viewport so the legal lines stay on a single line,
     down to small phones, without wrapping */
  font-size: clamp(0.55rem, 2.4vw, 0.85rem);
  line-height: 1.7;
  color: var(--ink-soft);
  animation: rise 700ms 180ms cubic-bezier(.2, .7, .2, 1) both;
}
.legal p {
  margin: 0.15rem 0;
  white-space: nowrap;   /* never break these lines */
}
.legal .copyright { color: var(--blue); }
.legal .note      { color: var(--accent); }
.legal .pledge    { color: var(--accent-2); }

/* --- Accessibility & focus ------------------------------------- */
a:focus-visible,
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- Motion ----------------------------------------------------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .logo, .tagline, .legal { animation: none; }
  .home-link { transition: none; }
}
