:root {
  --brand: #1a2570;
  --link-color: #1a2570;
  --bg-start: #f4f6fb;
  --bg-end: #e7eaf3;
  --text: #1f2430;
  --muted: #5b6472;
  --card-bg: #ffffff;
  --card-border: rgba(26, 37, 112, 0.08);
  --card-shadow: 0 24px 70px rgba(20, 24, 40, 0.14);
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 50% -10%, color-mix(in srgb, var(--brand) 10%, transparent), transparent 60%),
    radial-gradient(circle at top, var(--bg-start), var(--bg-end));
}

.card {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-top: 4px solid var(--brand);
  border-radius: 20px;
  padding: 48px 40px;
  text-align: center;
  box-shadow: var(--card-shadow);
}

.lang-switch {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 8%, transparent);
}

.lang-switch__btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  padding: 5px 11px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.lang-switch__btn:hover {
  color: var(--brand);
}

.lang-switch__btn.is-active {
  background: var(--brand);
  color: #ffffff;
}

.lang-switch__btn:focus-visible {
  outline: 2px solid var(--link-color);
  outline-offset: 2px;
}

.logo {
  width: 100%;
  max-width: 220px;
  height: auto;
  margin: 0 auto 28px;
  display: block;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  padding: 6px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 8%, transparent);
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.status__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 55%, transparent);
  animation: pulse 1.8s ease-out infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 55%, transparent); }
  70%  { box-shadow: 0 0 0 10px color-mix(in srgb, var(--brand) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 0%, transparent); }
}

h1 {
  margin: 0 0 12px;
  font-size: 1.5rem;
  line-height: 1.3;
}

p {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.6;
}

.contact {
  margin-top: 24px;
}

.contact a {
  color: var(--link-color);
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
}

.contact a:hover {
  text-decoration: underline;
}

.contact a:focus-visible {
  outline: 2px solid var(--link-color);
  outline-offset: 3px;
}

footer {
  margin-top: 28px;
  font-size: 0.85rem;
  color: var(--muted);
  opacity: 0.85;
}

@media (max-width: 480px) {
  .card {
    padding: 36px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .status__dot {
    animation: none;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-start: #12151f;
    --bg-end: #0b0d14;
    --text: #eef1f8;
    --muted: #a3abbd;
    --card-bg: #171a24;
    --card-border: rgba(255, 255, 255, 0.06);
    --card-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  }

  /*
    --brand / --link-color stay the configured brand value (script.js may set
    them from config.json). On the dark card the navy is too low-contrast, so we
    lighten it toward white at each usage site -- this keeps a custom linkColor
    working while staying readable.
  */
  .card {
    border-top-color: color-mix(in srgb, var(--brand) 55%, #ffffff);
  }

  .status {
    color: color-mix(in srgb, var(--brand) 45%, #ffffff);
    background: color-mix(in srgb, var(--brand) 22%, transparent);
  }

  .status__dot {
    background: color-mix(in srgb, var(--brand) 45%, #ffffff);
  }

  .contact a {
    color: color-mix(in srgb, var(--link-color) 45%, #ffffff);
  }

  .lang-switch__btn.is-active {
    background: color-mix(in srgb, var(--brand) 55%, #ffffff);
    color: #10131c;
  }

  .logo {
    /* wordmark is dark navy; lift it onto the dark card */
    filter: brightness(0) invert(1);
    opacity: 0.92;
  }
}
