/* Mathema — design tokens follow Logotip/files-7/mathema-1.1/prirucnik.md
   Teal (#0E8C86) is used only for lines and graphics, never for text on white. */

@font-face {
  font-family: "Inter";
  src: url("../fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #0B3050;
  --navy-deep: #082540;
  --teal: #0E8C86;
  --teal-light: #3FBFB4;
  --white: #FFFFFF;
  --ink: #0B3050;
  --body: #2E4257;
  --muted: #56687A;
  --line: #DCE3EA;
  --bg: #FFFFFF;
  --bg-alt: #F4F7F9;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 10px;
  --wrap: 1120px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --section-y: clamp(3rem, 6vw, 4.5rem);
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--body);
  background: var(--bg);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3 {
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 650; }
p { margin: 0 0 1em; }

a { color: var(--navy); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  z-index: 100;
  background: var(--navy);
  color: var(--white);
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
}
.skip-link:focus { left: 0.5rem; }

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

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}

.brand { display: block; padding-block: 0.75rem; }
/* 42px high ≈ 165px wide: above the 125px minimum for the horizontal lockup */
.brand img { height: 42px; width: auto; }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav ul {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 550;
  font-size: 0.975rem;
}
.nav a:hover { text-decoration: underline; }

/* Two-option switch: the current version is filled, the other one is a link */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 3px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.lang-switch svg { width: 1em; height: 1em; margin: 0 0.2rem 0 0.45rem; color: var(--muted); }
.lang-switch > a,
.lang-switch > span {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  line-height: 1.4;
}
.nav .lang-switch > a { font-size: inherit; font-weight: inherit; color: var(--muted); }
.nav .lang-switch > a:hover { color: var(--ink); background: var(--bg-alt); text-decoration: none; }
.lang-switch > [aria-current] { background: var(--navy); color: var(--white); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  margin-right: -0.5rem;
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle svg { width: 28px; height: 28px; }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.25rem var(--gutter) 1.75rem;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(11, 48, 80, 0.08);
  }
  .nav[hidden] { display: none; }
  .nav ul { flex-direction: column; gap: 1rem; }
  .nav a { font-size: 1.1rem; }
}
@media (min-width: 821px) {
  .nav[hidden] { display: flex; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-deep); }
.btn-light { background: var(--white); color: var(--navy); }
.btn-light:hover { background: #E6EEF3; }
.btn-outline-light { border-color: rgba(255, 255, 255, 0.55); color: var(--white); }
.btn-outline-light:hover { border-color: var(--white); background: rgba(255, 255, 255, 0.08); }
.btn-outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-outline:hover { background: var(--navy); color: var(--white); }

/* ---------- Hero ---------- */

.hero {
  background: var(--navy);
  color: #D5E0EA;
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  align-items: center;
  gap: 3rem;
  padding-block: clamp(4rem, 10vw, 7.5rem);
}
.hero h1 { color: var(--white); }
.hero .lead { font-size: clamp(1.1rem, 2vw, 1.25rem); max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }
.hero-mark { justify-self: center; width: min(100%, 360px); }
.hero-mark img { width: 100%; height: auto; }

@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 2rem; }
  .hero-mark { display: none; }
}

/* ---------- Sections ---------- */

.section { padding-block: var(--section-y); }
.section-alt { background: var(--bg-alt); }
.section-band { padding-block: clamp(2.5rem, 5vw, 3.5rem); }

.section-head { max-width: 44rem; margin-bottom: 3rem; }
.section-head p { font-size: 1.125rem; color: var(--muted); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
/* the ring node from the mark, as a small graphic accent */
.eyebrow::before,
.node-list li::before,
.card-title::before {
  content: "";
  flex: none;
  width: 0.7rem;
  height: 0.7rem;
  border: 2.5px solid var(--teal);
  border-radius: 50%;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 2rem 1.75rem;
}
.card-title { display: flex; align-items: baseline; gap: 0.7rem; }
.card-title::before { width: 0.85rem; height: 0.85rem; border-width: 3px; }
.card p { margin: 0; }
.grid-3 .card { display: flex; flex-direction: column; }
/* pushed to the bottom so tags line up across cards of different text length */
.card .tags { margin-top: auto; padding-top: 1rem; font-size: 0.9rem; color: var(--muted); }

.node-list { list-style: none; margin: 1.25rem 0 0; padding: 0; }
.node-list li {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  padding-block: 0.55rem;
  border-bottom: 1px solid var(--line);
}
.node-list li:last-child { border-bottom: 0; }
.node-list li::before { transform: translateY(0.05em); }

/* ---------- Education ---------- */

.edu-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}
@media (max-width: 900px) { .edu-grid { grid-template-columns: 1fr; } }
.edu-grid .card { display: flex; flex-direction: column; align-items: flex-start; }
.edu-grid .node-list { align-self: stretch; }
/* buttons sit at the bottom of each card */
.card-cta { margin-top: auto; }
.edu-grid .card > :has(+ .card-cta) { margin-bottom: 2rem; }

.section-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-top: 2.5rem;
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: var(--bg-alt);
}
.section-cta p { margin: 0; font-size: 1.075rem; color: var(--ink); font-weight: 500; }

.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  margin-bottom: 1rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #E3F1F0;
  color: #0A5F5B;
}
.badge-soon { background: #E7ECF2; color: var(--navy); }

/* ---------- Partners band ---------- */

.band {
  background: var(--navy);
  color: #D5E0EA;
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(2rem, 5vw, 3rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2rem;
}
.band h2 { color: var(--white); font-size: clamp(1.4rem, 3vw, 1.8rem); margin-bottom: 0.4em; }
.band p { margin: 0; max-width: 40rem; }

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 2rem; } }
.about-grid .lead { font-size: 1.15rem; color: var(--ink); }
.principles { display: grid; gap: 1.5rem; }
.principles h3 { margin-bottom: 0.25em; }
.principles p { margin: 0; color: var(--muted); }

/* ---------- Contact ---------- */

.contact-grid { display: grid; gap: 2rem; }

.contact-info { max-width: 44rem; }
.contact-info p { margin: 0; color: var(--muted); }

.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem 1.25rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: clamp(1.5rem, 4vw, 2.25rem);
}
.form .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form { grid-template-columns: 1fr; } }

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--ink);
}
.field .opt { font-weight: 400; color: var(--muted); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid #B9C6D2;
  border-radius: 8px;
  transition: border-color 0.15s;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%230B3050' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
}
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: var(--navy); }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: 3px solid rgba(14, 140, 134, 0.35); outline-offset: 0; border-color: var(--teal); }

.consent {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.925rem;
  color: var(--muted);
}
.consent input { width: 1.15rem; height: 1.15rem; margin-top: 0.2rem; accent-color: var(--navy); flex: none; }

.hp { display: none; }

.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.form-note { margin: 0; font-size: 0.85rem; color: var(--muted); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy);
  color: #BFCDDA;
  font-size: 0.925rem;
  padding-block: 3.5rem 2.5rem;
}
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid img { height: 40px; width: auto; margin-bottom: 1rem; }
.footer-grid address { font-style: normal; line-height: 1.7; }
.footer-grid h2 {
  color: var(--white);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; line-height: 2; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.85rem;
}
.footer-bottom p { margin: 0; }

/* ---------- Simple pages (privacy, thank you, 404) ---------- */

.page { padding-block: clamp(3rem, 8vw, 5.5rem); }
.page .wrap { max-width: 46rem; }
.page h2 { font-size: 1.35rem; margin-top: 2.2em; }
.page ul { padding-left: 1.2rem; }
.page li { margin-bottom: 0.35em; }
.page .meta { color: var(--muted); font-size: 0.925rem; }
.page .back-link { margin-top: 3rem; }

.center-page {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
}
.center-page img { width: 96px; height: auto; margin: 0 auto 2rem; }
.center-page .back-link { margin-top: 2rem; }
