:root {
  --klein: #002FA7;
  --accent: #1a73e8;
  --accent-soft: rgba(0, 47, 167, 0.12);
  --ink: #202124;
  --ink-muted: #5f6368;
  --surface: rgba(255, 255, 255, 0.55);
  --surface-strong: rgba(255, 255, 255, 0.72);
  --border: rgba(255, 255, 255, 0.65);
  --border-dim: rgba(255, 255, 255, 0.28);
  --shadow: 0 10px 40px rgba(32, 33, 36, 0.08), 0 2px 8px rgba(32, 33, 36, 0.04);
  --radius: 26px;
  --blur: 28px;
  --sat: 180%;
  --font: "Inter", "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--ink);
  background: #e8eef8;
  line-height: 1.55;
  overflow-x: hidden;
  font-size: clamp(15px, 0.35vw + 14px, 17px);
  padding-left: var(--safe-l);
  padding-right: var(--safe-r);
}

.mesh {
  position: fixed;
  inset: -20% -10% auto -10%;
  height: 70vh;
  background:
    radial-gradient(40% 50% at 20% 30%, rgba(0, 47, 167, 0.38), transparent 70%),
    radial-gradient(35% 45% at 80% 20%, rgba(52, 168, 83, 0.28), transparent 70%),
    radial-gradient(45% 40% at 60% 70%, rgba(251, 188, 5, 0.22), transparent 70%),
    radial-gradient(30% 35% at 10% 80%, rgba(234, 67, 53, 0.18), transparent 70%);
  filter: blur(40px);
  animation: drift 22s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}
.mesh-2 {
  inset: auto -15% -25% -5%;
  height: 55vh;
  animation-duration: 28s;
  animation-direction: alternate-reverse;
  opacity: 0.85;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(3%, 4%, 0) scale(1.06); }
}

.glass {
  background: linear-gradient(165deg, var(--surface-strong), var(--surface));
  backdrop-filter: blur(var(--blur)) saturate(var(--sat));
  -webkit-backdrop-filter: blur(var(--blur)) saturate(var(--sat));
  border: 1px solid var(--border-dim);
  border-top-color: var(--border);
  border-left-color: rgba(255, 255, 255, 0.5);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.75);
  position: relative;
}
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,0.45) 0%, transparent 42%, transparent 100%);
  opacity: 0.55;
}

.top {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: calc(12px + var(--safe-t)) max(16px, var(--safe-r)) 8px max(16px, var(--safe-l));
  display: block;
  width: 100%;
  box-sizing: border-box;
}
.nav-pill {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 10px;
  padding: 8px 8px 8px 16px;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}
.brand {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--klein);
  text-decoration: none;
  font-size: 1rem;
  min-height: 44px;
  padding: 8px 14px;
  margin-left: -14px;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  transition: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.brand.is-pressed {
  background: var(--accent-soft);
  box-shadow: 0 3px 10px rgba(0, 47, 167, 0.18);
}
@media (hover: hover) and (pointer: fine) {
  .brand:hover { background: var(--accent-soft); }
  .brand:focus-visible {
    background: var(--accent-soft);
    box-shadow: 0 0 0 2px rgba(0, 47, 167, 0.28);
  }
}
.nav-links {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  justify-self: center;
}
.lang {
  position: relative;
  z-index: 100;
  justify-self: end;
  margin-left: 0;
}
.nav-links a {
  color: var(--klein);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 999px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.nav-links a:hover,
.nav-links a:focus-visible {
  background: var(--accent-soft);
  outline: none;
}

.lang-btn {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--klein);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.lang-btn:hover,
.lang-btn[aria-expanded="true"] {
  background: var(--accent-soft);
}
.lang-btn:focus-visible { outline: 2px solid var(--klein); outline-offset: 2px; }
.globe { display: block; }
.lang-menu {
  position: fixed;
  right: auto;
  top: 0;
  left: 0;
  list-style: none;
  margin: 0;
  padding: 8px;
  min-width: 220px;
  z-index: 10000;
  border-radius: 18px;
  display: none;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 16px 48px rgba(32, 33, 36, 0.18);
}
.lang-menu[hidden],
.lang-menu:not(.is-open) { display: none !important; }
.lang-menu.is-open { display: block !important; }
.lang-menu li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
  min-height: 44px;
}
.lang-menu li:hover,
.lang-menu li:focus {
  background: var(--accent-soft);
  outline: none;
}
.lang-menu li[aria-selected="true"] {
  color: var(--klein);
  font-weight: 600;
}
.flag {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  flex-shrink: 0;
}
.flag svg {
  display: block;
  width: 20px;
  height: 14px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.12);
  overflow: hidden;
}

main { position: relative; z-index: 1; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.hero {
  padding: clamp(36px, 8vw, 88px) 16px 28px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-stage {
  width: min(640px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
}
.liquid-t {
  position: relative;
  width: clamp(148px, 30vw, 220px);
  aspect-ratio: 1 / 1;
  height: auto;
  display: grid;
  place-items: center;
  margin: 0 auto 4px;
  perspective: 700px;
}
.liquid-t-orb {
  position: absolute;
  width: 78%;
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at var(--orb-x, 35%) var(--orb-y, 30%), rgba(77, 124, 255, 0.6), transparent 55%),
    radial-gradient(circle at 70% 70%, rgba(0, 47, 167, 0.7), transparent 60%),
    radial-gradient(circle at 50% 50%, rgba(0, 47, 167, 0.35), transparent 70%);
  filter: blur(18px);
  animation: liquidPulse 7s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}
.liquid-t-mark {
  --lx: 32%;
  --ly: 28%;
  --shade-x: -10px;
  --shade-y: 18px;
  position: relative;
  z-index: 1;
  width: 78%;
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: 28px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, rgba(255,255,255,0.42), rgba(255,255,255,0.12));
  box-shadow:
    var(--shade-x) var(--shade-y) 36px rgba(0, 47, 167, 0.28),
    0 10px 28px rgba(32, 33, 36, 0.12),
    inset 0 1px 0 rgba(255,255,255,0.8);
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform, box-shadow;
  transition: box-shadow 0.08s linear;
}
.liquid-t-light {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--lx) var(--ly), rgba(255,255,255,0.72) 0%, rgba(255,255,255,0.18) 28%, transparent 55%),
    linear-gradient(135deg, rgba(255,255,255,0.28), transparent 42%);
  mix-blend-mode: soft-light;
  opacity: 0.95;
  z-index: 2;
}
.liquid-t-mark::before {
  opacity: 0.35;
}
.t-glyph {
  width: 58%;
  height: auto;
  display: block;
  position: relative;
  z-index: 1;
  filter: drop-shadow(calc(var(--shade-x) * 0.35) calc(var(--shade-y) * 0.35) 14px rgba(0, 47, 167, 0.4));
}
@keyframes liquidPulse {
  from { transform: scale(0.94); opacity: 0.85; }
  to { transform: scale(1.06); opacity: 1; }
}
.lede {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  font-size: clamp(1.15rem, 1.2vw + 1rem, 1.45rem);
  letter-spacing: -0.02em;
  max-width: 28ch;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 6px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
}
.btn.primary {
  background: var(--klein);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 47, 167, 0.32);
}
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost {
  color: var(--klein);
  background: rgba(255,255,255,0.45);
  border: 1px solid rgba(0, 47, 167, 0.22);
}
.btn.ghost:hover { background: var(--accent-soft); }

.section {
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.section-inner {
  width: min(820px, 100%);
  padding: clamp(22px, 3vw, 28px);
}
.section-inner h2,
.section-head h2 {
  margin: 0 0 12px;
  letter-spacing: -0.03em;
  font-size: clamp(1.25rem, 1.2vw + 1rem, 1.5rem);
}
.section-inner p { margin: 0 0 12px; color: var(--ink-muted); }
.section-inner p:last-child { margin-bottom: 0; }
.section-head {
  width: min(820px, 100%);
  padding: 0 4px;
}
.muted { margin: 0; color: var(--ink-muted); }

.cards {
  width: min(820px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.card {
  padding: 22px 20px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  min-width: 0;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(32, 33, 36, 0.12), inset 0 1px 0 rgba(255,255,255,0.8);
}
.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--klein);
  background: var(--accent-soft);
  margin-bottom: 14px;
}
.card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.94rem;
}

.contact .mail {
  display: inline-block;
  margin-top: 8px;
  color: var(--klein);
  font-weight: 600;
  font-size: clamp(1rem, 1.5vw + 0.85rem, 1.15rem);
  text-decoration: none;
  word-break: break-all;
}
.contact .mail:hover { text-decoration: underline; }

.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 28px 16px calc(40px + var(--safe-b));
  color: var(--ink-muted);
  font-size: 0.9rem;
}

/* iPad / tablet */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards .card:last-child { grid-column: 1 / -1; }
}

/* phones / small Android / iPhone */
@media (max-width: 760px) {
  .nav-pill {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 8px 8px 14px;
  }
  .brand { justify-self: auto; margin-right: 0; }
  .nav-links {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    justify-self: auto;
  }
  .lang { margin-left: auto; justify-self: auto; }
  .cards { grid-template-columns: 1fr; }
  .cards .card:last-child { grid-column: auto; }
  .card:hover { transform: none; }
  .lang-menu {
    width: min(240px, calc(100vw - 32px));
  }
}

@media (max-width: 390px) {
  .nav-links a { padding: 10px 10px; font-size: 0.88rem; }
  .section-inner { padding: 22px 18px; }
}

/* desktop polish */
@media (min-width: 1280px) {
  .hero { padding-top: 64px; }
  .hero-stage, .section-inner, .section-head, .cards { width: min(880px, 100%); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mesh, .mesh-2, .liquid-t-orb { animation: none; }
  .liquid-t-mark { transition: none; }
  .card { transition: none; }
  .card:hover { transform: none; }
}

@media (prefers-contrast: more) {
  .glass {
    background: rgba(255,255,255,0.92);
    border-color: #9aa0a6;
  }
  .lede, .card p, .section-inner p, .muted { color: #3c4043; }
  .brand, .nav-links a, .lang-btn { color: #002FA7; }
}

.app-card {
  min-height: 180px;
}
.app-item {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
  margin-top: 8px;
}
.app-meta { flex: 1 1 220px; min-width: 0; }
.app-name {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}
.app-blurb {
  margin: 0 0 8px;
  line-height: 1.55;
  max-width: 42rem;
}
.app-req {
  margin: 0;
  font-size: 0.9rem;
}
.app-dl {
  flex: 0 0 auto;
  align-self: center;
  text-decoration: none;
}
