/* Shared polish + dark-mode contrast for language landing pages */

:root {
  --lang-header-offset: 82px;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  padding-top: var(--lang-header-offset);
  color: var(--text-primary, #0f172a);
  background:
    radial-gradient(circle at 16% 12%, rgba(59, 130, 246, 0.12), transparent 36%),
    radial-gradient(circle at 85% 8%, rgba(14, 165, 233, 0.1), transparent 35%),
    linear-gradient(180deg, #f8fbff 0%, #f2f7ff 55%, #eef5ff 100%);
}

body > header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px clamp(14px, 2vw, 24px) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  background: color-mix(in srgb, var(--bg-primary, #ffffff) 88%, transparent) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

body > header nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

body > header .theme-aware-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 0 !important;
  box-shadow: none !important;
}

header .lang-link {
  background: transparent;
  border: none;
  color: var(--text-secondary, #334155);
  padding: 6px 0;
  font-size: 14px;
  font-weight: 700;
}

header .lang-link:hover {
  color: var(--text-primary, #0f172a);
  transform: none;
}

header .lang-cta-secondary {
  padding: 8px 16px !important;
  font-size: 13px !important;
  border-radius: 11px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: color-mix(in srgb, #ffffff 92%, #e2e8f0) !important;
  color: var(--text-primary, #0f172a);
}

main.lang-hero {
  min-height: calc(100vh - var(--lang-header-offset));
  padding: clamp(30px, 7vh, 62px) 20px 46px;
}

.lang-hero-content {
  max-width: 1000px;
}

.lang-hero h1 {
  letter-spacing: -0.02em;
}

.lang-hero p.subtitle {
  max-width: 700px;
}

.lang-badge {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(148, 163, 184, 0.35);
}

.lang-badge .flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(255, 255, 255, 0.92);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-secondary, #475569);
}

.lang-cta {
  min-height: 52px;
}

.lang-cta-primary {
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.lang-features {
  margin-top: 8px;
}

.lang-feature {
  background: rgba(255, 255, 255, 0.84);
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.lang-feature .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.28);
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lang-feature h3 {
  font-size: 16px;
}

.lang-feature p {
  font-size: 14px;
}

.lang-other {
  margin-top: 40px;
}

.lang-other .lang-links {
  gap: 12px;
}

.lang-other .lang-link {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(148, 163, 184, 0.32);
  color: var(--text-primary, #0f172a);
}

.lang-other .lang-link:hover {
  border-color: var(--accent-color, #1976d2);
  color: var(--accent-color, #1976d2);
}

.lang-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.hi-note {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(148, 163, 184, 0.36);
  color: #334155;
}

.hi-note strong {
  color: var(--text-primary, #0f172a);
}

/* Dark theme contrast */
:root[data-theme="dark"] body {
  color: #e5e7eb;
  background:
    radial-gradient(circle at 18% 12%, rgba(59, 130, 246, 0.2), transparent 36%),
    radial-gradient(circle at 86% 10%, rgba(14, 165, 233, 0.18), transparent 34%),
    linear-gradient(180deg, #0b1220 0%, #0f172a 48%, #111827 100%);
}

:root[data-theme="dark"] body > header {
  border-bottom-color: rgba(148, 163, 184, 0.26);
  background: rgba(7, 12, 26, 0.76) !important;
  box-shadow: 0 12px 34px rgba(2, 6, 23, 0.45);
}

:root[data-theme="dark"] body > header .theme-aware-logo {
  box-shadow: none !important;
}

:root[data-theme="dark"] header .lang-link {
  color: #dbe5f3;
}

:root[data-theme="dark"] header .lang-link:hover {
  color: #f8fafc;
}

:root[data-theme="dark"] header .lang-cta-secondary {
  border-color: rgba(148, 163, 184, 0.34);
  background: rgba(15, 23, 42, 0.85) !important;
  color: #f8fafc;
}

:root[data-theme="dark"] .lang-hero h1 {
  color: #f8fafc;
}

:root[data-theme="dark"] .lang-hero p.subtitle {
  color: #cbd5e1;
}

:root[data-theme="dark"] .lang-badge {
  background: rgba(15, 23, 42, 0.78);
  border-color: rgba(148, 163, 184, 0.34);
  color: #dbe5f3;
}

:root[data-theme="dark"] .lang-badge .flag {
  border-color: rgba(148, 163, 184, 0.45);
  background: rgba(30, 41, 59, 0.9);
  color: #e2e8f0;
}

:root[data-theme="dark"] .lang-cta-secondary {
  border-color: rgba(148, 163, 184, 0.34);
  background: rgba(15, 23, 42, 0.8);
  color: #f8fafc;
}

:root[data-theme="dark"] .lang-cta-secondary:hover {
  border-color: #60a5fa;
  color: #eff6ff;
  background: rgba(30, 41, 59, 0.9);
}

:root[data-theme="dark"] .lang-feature {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.92));
  border-color: rgba(148, 163, 184, 0.24);
  box-shadow: 0 16px 35px rgba(2, 6, 23, 0.42);
}

:root[data-theme="dark"] .lang-feature h3 {
  color: #f8fafc;
}

:root[data-theme="dark"] .lang-feature p {
  color: #cbd5e1;
}

:root[data-theme="dark"] .lang-feature .icon {
  border-color: rgba(147, 197, 253, 0.44);
  background: rgba(59, 130, 246, 0.2);
  color: #bfdbfe;
}

:root[data-theme="dark"] .lang-other {
  border-top-color: rgba(148, 163, 184, 0.24);
}

:root[data-theme="dark"] .lang-other h2 {
  color: #f8fafc;
}

:root[data-theme="dark"] .lang-other .lang-link {
  background: rgba(15, 23, 42, 0.78);
  border-color: rgba(148, 163, 184, 0.3);
  color: #e2e8f0;
}

:root[data-theme="dark"] .lang-other .lang-link:hover {
  border-color: #60a5fa;
  color: #bfdbfe;
}

:root[data-theme="dark"] .lang-footer {
  border-top-color: rgba(148, 163, 184, 0.22);
  color: #94a3b8;
}

:root[data-theme="dark"] .lang-footer a {
  color: #93c5fd;
}

:root[data-theme="dark"] .hi-note {
  background: rgba(15, 23, 42, 0.8);
  border-color: rgba(148, 163, 184, 0.36);
  color: #dbe5f3;
}

:root[data-theme="dark"] .hi-note strong {
  color: #f8fafc;
}

@media (max-width: 768px) {
  :root {
    --lang-header-offset: 118px;
  }

  body > header {
    flex-direction: column;
    align-items: stretch;
  }

  body > header nav {
    justify-content: space-between;
  }

  .lang-hero {
    padding-top: 24px;
  }

  .lang-cta-group {
    display: grid;
    grid-template-columns: 1fr;
    width: min(100%, 420px);
    margin-left: auto;
    margin-right: auto;
  }

  .lang-cta {
    justify-content: center;
    width: 100%;
  }

  .lang-features {
    grid-template-columns: 1fr;
  }
}
