:root {
  --paspoint-blue: #273070;
  --paspoint-cyan: #3ac1e1;
  --header-height: 72px;
  --hero-max-height: 600px;
  --hero-filter: rgba(39, 48, 112, 0.45);
  --service-rings-opacity: 0.12;
  --news-background: #f0f8fc;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: calc(var(--header-height) + 20px);
}

body {
  margin: 0;
  padding-top: var(--header-height);
  background: #fff;
  color: var(--paspoint-blue);
  font-family: "DM Sans", sans-serif;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.content-grid {
  width: min(1140px, calc(100% - 64px));
  margin-inline: auto;
}

/* Společný základ CTA. */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--paspoint-blue);
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  text-decoration: none;
}

.cta:focus-visible {
  outline: 2px solid var(--paspoint-blue);
  outline-offset: 4px;
}

/* Hero. */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  width: 100%;
  height: clamp(320px, 65vh, var(--hero-max-height));
  max-height: var(--hero-max-height);
  overflow: hidden;
  background: #e5f5fa;
}

.hero-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--hero-filter);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1140px, calc(100% - 64px));
  margin-inline: auto;
  padding-block: 32px;
  font-family: "Bricolage Grotesque", sans-serif;
}

.hero-text {
  max-width: 650px;
  margin-left: auto;
  text-align: right;
}

.hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(32px, 4.2vw, 60px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.hero .cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-width: 120px;
  min-height: 48px;
  margin-top: 28px;
  padding: 14px 30px;
  border: 0;
  background: var(--paspoint-cyan);
  font-size: 18px;
  line-height: 1.2;
}

.hero .cta::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  left: -12px;
  width: 44px;
  height: calc(100% + 2px);
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.35);
  opacity: 0;
  transform: translateY(-50%);
  pointer-events: none;
  transition:
    left 750ms cubic-bezier(0.4, 0, 0.2, 1),
    width 750ms cubic-bezier(0.4, 0, 0.2, 1),
    opacity 300ms ease;
}

.hero .cta:focus-visible::before {
  left: -1px;
  width: calc(100% + 2px);
  opacity: 1;
}

.hero .cta:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 5px;
}

@media (hover: hover) {
  .hero .cta:hover::before {
    left: -1px;
    width: calc(100% + 2px);
    opacity: 1;
  }
}

/* Sekce a nadpisy. */
.services,
.news,
.supporters {
  padding-block: 80px 100px;
}

.services {
  overflow-x: clip;
}

.news {
  background: var(--news-background);
}

.supporters {
  background: #fff;
}

.animated-heading {
  --circle-size: 20px;
  --circle-gap: 16px;
  display: flex;
  align-items: center;
  gap: var(--circle-gap);
  width: fit-content;
  max-width: 100%;
}

.section-title {
  min-width: 0;
  margin: 0;
  color: var(--paspoint-blue);
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(32px, 4.2vw, 56px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.035em;
  text-align: left;
}

.heading-circle {
  order: -1;
  flex-shrink: 0;
  width: var(--circle-size);
  height: var(--circle-size);
  border-radius: 50%;
  background: var(--paspoint-cyan);
  pointer-events: none;
}

.heading-letter {
  opacity: 1;
}

.animated-heading.is-ready .heading-letter {
  opacity: 0;
}

.animated-heading.is-ready .heading-letter.is-visible {
  opacity: 1;
}

.animated-heading.is-ready .heading-circle {
  opacity: 0;
}

.animated-heading.is-circle-running .heading-circle {
  animation: heading-circle-arrive 900ms
    cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes heading-circle-arrive {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Služby. */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  column-gap: 48px;
  row-gap: 40px;
  margin-top: 48px;
}

.service-item {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  padding: 12px 4px;
  color: var(--paspoint-blue);
  text-align: center;
}

.service-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.service-icon {
  display: block;
  flex-shrink: 0;
  width: 180px;
  height: 180px;
  max-width: 100%;
  margin-bottom: 12px;
  object-fit: contain;
  object-position: center;
}

.service-item h3 {
  margin: 0 0 10px;
  color: var(--paspoint-blue);
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-align: center;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.service-item p {
  max-width: 310px;
  margin: 0;
  color: #505677;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  text-align: center;
}

/* Textové CTA služeb a aktualit. */
.services .cta,
.news .cta {
  position: relative;
  isolation: isolate;
  min-width: 88px;
  min-height: 44px;
  margin-top: 4px;
  padding: 10px 22px;
  border: 0;
  background: transparent;
  font-size: 16px;
  line-height: 24px;
}

.services .cta::before,
.news .cta::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  left: -12px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--paspoint-cyan);
  opacity: 0;
  transform: translateY(-50%);
  pointer-events: none;
  transition:
    left 750ms cubic-bezier(0.4, 0, 0.2, 1),
    width 750ms cubic-bezier(0.4, 0, 0.2, 1),
    opacity 300ms ease;
}

.services .cta:focus-visible::before,
.news .cta:focus-visible::before {
  left: 0;
  width: 100%;
  opacity: 1;
}

@media (hover: hover) {
  .services .cta:hover::before,
  .news .cta:hover::before {
    left: 0;
    width: 100%;
    opacity: 1;
  }
}

/* Kruhy služeb: společný vzhled. */
.service-rings {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  width: calc(100% + 165px);
  aspect-ratio: 1;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.96);
  pointer-events: none;
  transition:
    opacity 550ms ease,
    transform 800ms cubic-bezier(0.22, 1, 0.36, 1);
}

.service-ring {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: center;
}

.ring-outer {
  animation: service-ring-clockwise 19s linear infinite;
  animation-play-state: paused;
}

.ring-middle {
  animation: service-ring-counterclockwise 24s linear infinite;
  animation-play-state: paused;
}

.ring-inner {
  animation: service-ring-clockwise 29s linear infinite;
  animation-play-state: paused;
}

/* Mobil a dotyková zařízení: aktivace při scrollování. */
.service-item.is-in-view {
  z-index: 2;
}

.service-item.is-in-view .service-rings {
  opacity: var(--service-rings-opacity);
  transform: translate(-50%, -50%) scale(1);
}

.service-item.is-in-view .service-ring {
  animation-play-state: running;
}

/* Počítač: aktivace myší nebo klávesnicí. */
@media (min-width: 701px) and (hover: hover) {
  .service-item:is(:hover, :focus-within) {
    z-index: 2;
  }

  .service-item:is(:hover, :focus-within) .service-rings {
    opacity: var(--service-rings-opacity);
    transform: translate(-50%, -50%) scale(1);
  }

  .service-item:is(:hover, :focus-within) .service-ring {
    animation-play-state: running;
  }
}

@keyframes service-ring-clockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes service-ring-counterclockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

/* Aktuality. */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.news-all {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  min-height: 44px;
  margin-left: auto;
  color: var(--paspoint-blue);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
}

.news-all-label {
  display: inline-block;
}

.news-all-label::after {
  content: attr(data-label);
  display: block;
  height: 0;
  font-weight: 700;
  visibility: hidden;
  pointer-events: none;
}

.news-all-arrow {
  display: inline-block;
  font-size: 24px;
  line-height: 1;
  transition: transform 300ms ease;
}

.news-all:is(:hover, :focus-visible) {
  font-weight: 700;
}

.news-all:is(:hover, :focus-visible) .news-all-arrow {
  transform: translateX(6px);
}

.news-all:focus-visible {
  outline: 2px solid var(--paspoint-blue);
  outline-offset: 5px;
}

.news-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  align-items: stretch;
  gap: 24px;
  margin-top: 48px;
}

.news-item {
  min-width: 0;
  padding: 24px;
  border-radius: 20px;
  background: #fff;
}

.news-featured {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.news-image {
  display: block;
  width: 100%;
  min-width: 0;
  border-radius: 12px;
  background: #f3f8fa;
  object-fit: cover;
  object-position: center;
}

.news-featured > .news-image {
  flex: none;
  height: auto;
  max-height: 180px;
  object-fit: contain;
  background: #fff;
}

.news-stack {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 24px;
  min-width: 0;
}

.news-horizontal {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr);
  align-items: start;
  gap: 24px;
}

.news-horizontal > .news-image {
  height: auto;
  aspect-ratio: 1;
}

.news-image-logo {
  padding: 18px;
  object-fit: contain;
  background: #fff;
}

.news-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.news-item h3 {
  margin: 0 0 10px;
  color: var(--paspoint-blue);
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
  overflow-wrap: break-word;
}

.news-featured h3 {
  font-size: 28px;
}

.news-horizontal h3 {
  font-size: 24px;
}

.news-date {
  display: block;
  margin-bottom: 12px;
  color: #69708b;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
}

.news-item p {
  margin: 0;
  color: #505677;
  font-weight: 400;
}

.news-featured p {
  font-size: 18px;
  line-height: 1.6;
}

.news-horizontal p {
  font-size: 16px;
  line-height: 1.5;
}

.news-body .cta {
  align-self: center;
}

/* Podporovatelé: masonry. */
.supporters-grid {
  column-count: 5;
  column-gap: 40px;
  margin: 56px 0 0;
  padding: 0;
  list-style: none;
}

.supporter-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: 24px;
  padding: 20px 12px;
  break-inside: avoid;
  page-break-inside: avoid;
}

.supporter-logo img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 170px;
  max-height: 220px;
  object-fit: contain;
  object-position: center;
  filter: grayscale(100%);
  opacity: 0.5;
  transition:
    filter 400ms ease,
    opacity 400ms ease;
}

@media (hover: hover) {
  .supporter-logo:hover img {
    filter: grayscale(0%);
    opacity: 1;
  }
}

@media (hover: none) {
  .supporter-logo img {
    filter: none;
    opacity: 1;
  }
}

/* Responzivní zobrazení. */
@media (max-width: 1150px) {
  .content-grid,
  .hero-content {
    width: min(1140px, calc(100% - 40px));
  }
}

@media (max-width: 1000px) {
  .news-item {
    padding: 20px;
  }

  .news-horizontal {
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.6fr);
    gap: 18px;
  }

  .news-featured h3 {
    font-size: 26px;
  }

  .news-horizontal h3 {
    font-size: 22px;
  }
}

@media (max-width: 900px) {
  .supporters-grid {
    column-count: 4;
    column-gap: 24px;
  }
}

@media (max-width: 860px) {
  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 40px;
    row-gap: 32px;
  }

  .service-rings {
    width: calc(100% + 135px);
  }
}

@media (max-width: 760px) {
  .news-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .news-stack {
    grid-template-rows: none;
    grid-auto-rows: auto;
  }

  .news-horizontal {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  }

  .news-featured h3 {
    font-size: 28px;
  }

  .news-horizontal h3 {
    font-size: 24px;
  }
}

@media (max-width: 600px) {
  .hero {
    height: clamp(320px, 55vh, 440px);
  }

  .hero-content {
    padding-block: 24px;
  }

  .hero h1 {
    font-size: clamp(30px, 7.5vw, 42px);
  }

  .hero .cta {
    margin-top: 24px;
  }

  .services,
  .news,
  .supporters {
    padding-block: 56px 72px;
  }

  .animated-heading {
    --circle-size: 16px;
    --circle-gap: 12px;
  }

  .section-header {
    flex-wrap: wrap;
    gap: 12px;
  }

  .news-all {
    font-size: 14px;
    gap: 8px;
  }

  .news-layout {
    margin-top: 32px;
  }

  .supporters-grid {
    column-count: 3;
    column-gap: 16px;
    margin-top: 36px;
  }

  .supporter-logo {
    margin-bottom: 16px;
    padding: 16px 8px;
  }

  .supporter-logo img {
    max-height: 160px;
  }
}

@media (max-width: 560px) {
  .services-grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 28px;
    margin-top: 32px;
  }

  .service-item {
    padding: 12px;
  }

  .service-icon {
    width: 160px;
    height: 160px;
  }

  .service-item h3 {
    max-width: 320px;
  }

  .service-rings {
    width: min(505px, calc(100% + 105px));
  }
}

@media (max-width: 480px) {
  .news-horizontal {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .news-horizontal > .news-image {
    aspect-ratio: 4 / 3;
  }

  .news-horizontal p {
    font-size: 18px;
    line-height: 1.6;
  }
}

@media (max-width: 400px) {
  .supporters-grid {
    column-count: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero .cta::before,
  .services .cta::before,
  .news .cta::before,
  .service-rings,
  .news-all-arrow,
  .supporter-logo img {
    transition: none;
  }

  .news-all:is(:hover, :focus-visible) .news-all-arrow {
    transform: none;
  }

  .service-ring {
    animation: none;
  }

  .animated-heading.is-ready .heading-letter {
    opacity: 1;
  }

  .animated-heading.is-ready .heading-circle {
    opacity: 1;
    animation: none;
    transform: none;
  }
}