:root {
  --bg: #ffffff;
  --bg-soft: #f4f7fb;
  --bg-ice: #eef7ff;
  --panel: #ffffff;
  --ink: #071f3f;
  --ink-2: #12345f;
  --muted: #627287;
  --blue: #0b4fb3;
  --blue-2: #2579d8;
  --ice: #73c4ff;
  --line: rgba(7, 31, 63, 0.11);
  --line-blue: rgba(37, 121, 216, 0.22);
  --shadow: 0 24px 70px rgba(7, 31, 63, 0.1);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(145deg, rgba(115, 196, 255, 0.16), transparent 32%),
    linear-gradient(225deg, rgba(11, 79, 179, 0.06), transparent 34%),
    var(--bg);
  color: var(--ink);
  font-family: "Inter", Arial, sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 32px), var(--max));
  min-height: 74px;
  margin: 0 auto;
  padding: 14px 0;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 10px -14px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 16px 45px rgba(7, 31, 63, 0.08);
  backdrop-filter: blur(18px);
  z-index: -1;
}

.legal-header::before {
  background: rgba(255, 255, 255, 0.94);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 900;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  color: #ffffff;
  font-size: 0.78rem;
  box-shadow: 0 14px 28px rgba(11, 79, 179, 0.22);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
  background: var(--bg-ice);
}

.site-nav .nav-cta {
  color: #ffffff;
  background: var(--blue);
  box-shadow: 0 14px 28px rgba(11, 79, 179, 0.22);
}

.site-nav .nav-cta:hover,
.site-nav .nav-cta:focus-visible {
  color: #ffffff;
  background: #083f91;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
}

.hero {
  min-height: 82svh;
  margin-top: -74px;
  padding: 148px 16px 60px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.99) 0%, rgba(255, 255, 255, 0.93) 38%, rgba(255, 255, 255, 0.2) 70%, rgba(255, 255, 255, 0.44) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.98) 100%),
    url("assets/estonia-council-nordic-digital-products.png");
  background-position: center;
  background-size: cover;
}

.hero-inner {
  width: min(100%, var(--max));
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  color: var(--ink);
  line-height: 1.02;
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 24px;
  font-size: clamp(3rem, 8vw, 6.2rem);
  font-weight: 900;
}

h2 {
  max-width: 840px;
  margin-bottom: 0;
  font-size: clamp(2.1rem, 4.2vw, 4.1rem);
  font-weight: 900;
}

h3 {
  color: var(--ink);
  font-size: 1.18rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 640px;
  color: var(--muted);
  font-size: 1.15rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 34px 0;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 14px 20px;
  border-radius: 8px;
  font-weight: 900;
  letter-spacing: 0;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  box-shadow: 0 18px 34px rgba(11, 79, 179, 0.23);
}

.secondary-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line-blue);
}

.primary-button:hover,
.primary-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 22px 44px rgba(11, 79, 179, 0.28);
}

.secondary-button:hover,
.secondary-button:focus-visible {
  border-color: var(--blue);
  background: #ffffff;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 790px;
}

.hero-metrics div {
  min-height: 112px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 42px rgba(7, 31, 63, 0.08);
}

.hero-metrics strong {
  display: block;
  margin-bottom: 14px;
  color: var(--blue);
  font-size: 0.86rem;
}

.hero-metrics span {
  display: block;
  color: var(--ink);
  font-weight: 900;
  line-height: 1.35;
}

.section {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
  padding: 88px 0;
}

.section-heading {
  display: grid;
  gap: 14px;
  margin-bottom: 34px;
}

.intro {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: end;
  padding-top: 70px;
}

.intro-copy {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 1.12rem;
}

.card-grid {
  display: grid;
  gap: 18px;
}

.card-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.service-card,
.system-card,
.timeline-item,
.legal-content article {
  border: 1px solid rgba(7, 31, 63, 0.09);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.service-card {
  min-height: 260px;
  padding: 26px;
}

.card-number {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 34px;
  border-radius: 8px;
  color: var(--blue);
  background: var(--bg-ice);
  font-size: 0.84rem;
  font-weight: 900;
}

.service-card p,
.system-card p,
.timeline-item p,
.legal-content p {
  color: var(--muted);
}

.systems {
  position: relative;
}

.systems::before {
  content: "";
  position: absolute;
  inset: 38px -4vw;
  border-top: 1px solid var(--line-blue);
  border-bottom: 1px solid var(--line-blue);
  background: linear-gradient(135deg, var(--bg-soft), #ffffff 48%, var(--bg-ice));
  z-index: -1;
}

.system-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.system-card {
  min-height: 295px;
  padding: 30px;
  background:
    linear-gradient(180deg, rgba(238, 247, 255, 0.72), rgba(255, 255, 255, 0.96)),
    #ffffff;
}

.system-card span {
  display: inline-flex;
  margin-bottom: 34px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.process {
  padding-top: 44px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.timeline-item {
  min-height: 248px;
  padding: 28px;
}

.timeline-item span {
  display: inline-flex;
  margin-bottom: 36px;
  color: var(--blue);
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.timeline-item strong {
  display: block;
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 1.12rem;
}

.contact-section {
  width: min(calc(100% - 32px), var(--max));
  margin: 40px auto 96px;
}

.contact-inner {
  padding: clamp(34px, 6vw, 70px);
  border: 1px solid var(--line-blue);
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(238, 247, 255, 0.95), rgba(255, 255, 255, 0.96) 52%, rgba(244, 247, 251, 0.96)),
    #ffffff;
  box-shadow: var(--shadow);
}

.contact-inner h2 {
  max-width: 790px;
  margin-bottom: 18px;
}

.contact-inner p:not(.eyebrow) {
  max-width: 640px;
  color: var(--muted);
  font-size: 1.08rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
  padding: 34px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-brand {
  margin-bottom: 12px;
}

.site-footer p {
  max-width: 430px;
  margin-bottom: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px 18px;
  max-width: 540px;
}

.footer-links a {
  color: var(--ink);
  font-weight: 800;
}

.footer-links a:hover,
.footer-links a:focus-visible,
.footer-links a[aria-current="page"] {
  color: var(--blue);
}

.legal-main {
  width: min(calc(100% - 32px), 920px);
  margin: 0 auto;
  padding: 74px 0 82px;
}

.legal-hero {
  padding: 72px 0 38px;
}

.legal-hero h1 {
  margin-bottom: 16px;
}

.legal-hero p:last-child {
  color: var(--muted);
  font-weight: 700;
}

.legal-content {
  display: grid;
  gap: 16px;
}

.legal-content article {
  padding: 28px;
}

.legal-content h2 {
  margin-bottom: 12px;
  font-size: 1.25rem;
  line-height: 1.3;
}

.legal-content a {
  color: var(--blue);
  font-weight: 800;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 980px) {
  h1 {
    max-width: 680px;
  }

  .card-grid.four,
  .system-layout,
  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .intro {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-header {
    width: min(calc(100% - 24px), var(--max));
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: min(320px, calc(100vw - 24px));
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    width: 100%;
  }

  .hero {
    min-height: auto;
    padding-top: 136px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(255, 255, 255, 0.93) 54%, rgba(255, 255, 255, 0.54) 100%),
      url("assets/estonia-council-nordic-digital-products.png");
    background-position: center top;
    background-size: cover;
  }

  .hero-metrics,
  .card-grid.four,
  .system-layout,
  .timeline {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 66px 0;
  }

  .service-card,
  .system-card,
  .timeline-item {
    min-height: auto;
  }

  .timeline-item span {
    margin-bottom: 24px;
  }

  .site-footer {
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .hero-actions {
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .brand {
    gap: 8px;
    font-size: 0.92rem;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  h1 {
    font-size: 2.62rem;
  }
}
