/*
Theme Name: CSP Registry Core
Theme URI: https://csp-registry.org/
Description: Eigenständiges, pluginfreies Block-Theme für die CSP Registry.
Author: CSP Registry
Version: 2.0.1
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: csp-registry-core
*/

:root {
  --csp-ink: #212d3b;
  --csp-copy: #677a92;
  --csp-blue: #2ea3f2;
  --csp-button: #0c71c3;
  --csp-cyan: #37dfff;
  --csp-cyan-bright: #0ee1f4;
  --csp-cloud: #f1f5f7;
  --csp-footer: #292929;
  --csp-white: #fff;
  --csp-shadow: rgba(102, 141, 186, 0.28);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: clip;
  color: var(--csp-copy);
  background: var(--csp-white);
  font-family: "Montserrat", Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.8;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--csp-blue); text-underline-offset: .16em; }
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  color: var(--csp-ink);
  font-family: "Montserrat", Helvetica, Arial, sans-serif;
  font-weight: 300;
  line-height: 1.35;
}
h1 { font-size: clamp(2rem, 3vw, 2.625rem); }
h2 { font-size: clamp(1.8rem, 2.7vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.15em; }

.wp-site-blocks { padding: 0; }
.wp-site-blocks > * { margin-block-start: 0; }
.entry-content { margin: 0; }
.entry-content > * { margin-block-start: 0; }

/* Header */
.csp-site-header {
  position: relative;
  z-index: 20;
  min-height: 80px;
  border-bottom: 1px solid #e7e7e7;
  background: var(--csp-white);
}
.csp-header-inner {
  width: min(100% - 76px, 1840px);
  min-height: 80px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.csp-header-inner .wp-block-site-logo { flex: 0 0 auto; margin: 0; }
.csp-header-inner .custom-logo { width: 205px; max-height: 52px; object-fit: contain; }
.csp-main-navigation {
  margin-left: auto;
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-transform: uppercase;
}
.csp-main-navigation a { color: #5f5f5f; text-decoration: none; }
.csp-main-navigation a:hover,
.csp-main-navigation .current-menu-item > a,
.csp-main-navigation .current-menu-ancestor > a { color: #129bf5; }
.csp-main-navigation .wp-block-navigation__container { gap: 26px; }

/* Shared components */
.csp-icon { width: 64px; height: 64px; object-fit: contain; }
.csp-icon--center { margin-inline: auto; }
.csp-button,
.csp-button:visited,
.wp-block-read-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 0 30px;
  border: 0;
  border-radius: 100px;
  color: #fff;
  background: var(--csp-button);
  font-family: "Montserrat", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform .2s ease, background .2s ease;
}
.csp-button:hover,
.wp-block-read-more:hover { color: #fff; background: #085fa8; transform: translateY(-2px); }

/* Original asymmetric hero */
.csp-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  width: 100%;
  min-height: 640px;
  background: #fff;
}
.csp-hero__content {
  align-self: center;
  max-width: 850px;
  padding: 90px 7vw 80px 12vw;
}
.csp-hero__content h1 { max-width: 640px; margin-bottom: 45px; }
.csp-hero__content p { max-width: 610px; font-size: 18px; line-height: 2; }
.csp-hero__content .csp-icon { margin-bottom: 36px; }
.csp-hero__content .csp-button { margin-top: 52px; }
.csp-hero__media { align-self: start; overflow: hidden; padding-top: 0; }
.csp-hero__media img {
  width: 100%;
  min-height: 555px;
  max-height: 640px;
  object-fit: cover;
  object-position: center;
  border-radius: 35vw 0 0 35vw;
  border-left: clamp(16px, 2vw, 38px) solid var(--csp-cyan);
  box-shadow: -30px 0 0 rgba(0, 0, 0, .79);
}
.csp-hero--home .csp-hero__media img { object-position: 50% 50%; }

/* Home */
.csp-home-intro {
  padding: 115px 30px 95px;
  text-align: center;
}
.csp-home-intro .csp-icon { margin: 0 auto 24px; }
.csp-home-intro h2 { margin-bottom: 28px; }
.csp-home-intro p { max-width: 800px; margin-inline: auto; font-size: 18px; line-height: 2; }
.csp-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}
.csp-split--cloud {
  overflow: hidden;
  border-radius: 0 15vw 0 0;
  background: var(--csp-cloud);
}
.csp-split__image img { width: 100%; height: 100%; min-height: 560px; object-fit: cover; }
.csp-split--cloud .csp-split__image img {
  border-radius: 0 30px 15vw 0;
  filter: grayscale(1);
  box-shadow: 0 30px 80px -30px rgba(102, 141, 186, .7);
}
.csp-split__content { align-self: center; padding: 80px clamp(40px, 7vw, 135px); }
.csp-split__content .csp-icon { margin-bottom: 24px; }
.csp-split__content h2 { margin-bottom: 22px; }
.csp-split__content p { max-width: 640px; font-size: 17px; line-height: 2; }
.csp-home-cta { padding: 85px 30px; text-align: center; }
.csp-home-cta p { max-width: 700px; margin: 0 auto 30px; font-size: 20px; }

/* Information */
.csp-criteria { padding: 100px max(32px, 10vw); background: var(--csp-cloud); }
.csp-criteria__heading { max-width: 860px; margin: 0 auto 55px; text-align: center; }
.csp-criteria__heading .csp-icon { margin: 0 auto 20px; }
.csp-criteria-list { max-width: 1100px; margin: 0 auto; padding: 0; list-style: none; }
.csp-criteria-list li {
  position: relative;
  margin-bottom: 16px;
  padding: 22px 28px 22px 72px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 36px -25px var(--csp-shadow);
}
.csp-criteria-list li::before {
  content: "✓";
  position: absolute;
  left: 28px;
  top: 20px;
  color: var(--csp-blue);
  font-size: 24px;
  font-weight: 700;
}
.csp-information-note { max-width: 980px; margin: 0 auto; padding: 70px 30px 100px; font-size: 17px; }

/* Steering committee */
.csp-team-section { padding: 95px max(30px, 8vw) 110px; background: var(--csp-cloud); }
.csp-team-section > h2 { margin-bottom: 60px; text-align: center; }
.csp-team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 56px;
  max-width: 1080px;
  margin: 0 auto;
}
.csp-team-card { overflow: hidden; border-radius: 30px; background: #fff; box-shadow: 0 24px 55px -35px var(--csp-shadow); }
.csp-team-card img { width: 100%; aspect-ratio: 7 / 6; object-fit: cover; object-position: top center; }
.csp-team-card__body { padding: 34px 38px 42px; }
.csp-team-card__body h3 { margin-bottom: 18px; font-size: 24px; }
.csp-team-card__body p { font-size: 15px; line-height: 1.85; }

/* Generic imported documents */
.csp-document { padding: 90px max(30px, 8vw) 110px; }
.csp-document__inner { width: min(100%, 1180px); margin: 0 auto; }
.csp-legacy-flat div,
.csp-legacy-flat span { display: contents; }
.csp-legacy-flat > img,
.csp-legacy-flat img[width="64"] { width: 64px; height: 64px; margin-bottom: 28px; object-fit: contain; }
.csp-legacy-flat h1 { margin-bottom: 45px; }
.csp-legacy-flat h2 { margin-top: 55px; margin-bottom: 24px; }
.csp-legacy-flat h3 { margin-top: 34px; margin-bottom: 12px; font-weight: 500; }
.csp-legacy-flat h4,
.csp-legacy-flat h5 { margin-top: 28px; margin-bottom: 10px; font-weight: 500; }
.csp-legacy-flat p { max-width: 980px; }
.csp-document--centers .csp-legacy-flat h2:nth-of-type(-n+2) {
  display: inline-block;
  margin: 15px 24px 35px 0;
  padding: 26px 34px;
  border-radius: 22px;
  background: var(--csp-cloud);
}
.csp-document--faq .csp-legacy-flat h5 {
  margin: 18px 0 0;
  padding: 22px 28px;
  border-left: 4px solid var(--csp-blue);
  border-radius: 8px 8px 0 0;
  background: var(--csp-cloud);
}
.csp-document--faq .csp-legacy-flat h5 + p {
  max-width: none;
  padding: 0 28px 24px;
  background: var(--csp-cloud);
}
.csp-document--project-sponsors .csp-legacy-flat img:not([width="64"]) {
  display: inline-block;
  width: auto;
  max-width: 260px;
  max-height: 120px;
  margin: 28px 40px 28px 0;
  object-fit: contain;
}
.csp-document--contact .csp-legacy-flat h3 { padding-top: 24px; border-top: 1px solid #e2e8ec; }
.csp-document--privacy-policy .csp-document__inner { max-width: 960px; }
.csp-document--privacy-policy h2 { font-size: 29px; }

/* Resources */
.csp-resources-intro { padding: 32px max(30px, 8vw) 90px; }
.csp-resources-intro__inner { width: min(100%, 1090px); margin: 0 auto; }
.csp-resources-intro .csp-icon { margin-bottom: 25px; }
.csp-resources-intro h1 { margin-bottom: 36px; }
.csp-resources-grid {
  overflow: hidden;
  padding: 125px max(30px, 8vw) 120px;
  border-radius: 0 15vw 0 0;
  background: var(--csp-cloud);
}
.csp-resources-grid .wp-block-post-template {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 56px;
  width: min(100%, 1090px);
  margin: 0 auto;
  padding: 0;
}
.csp-resource-card {
  min-width: 0;
  padding: 25px 20px 28px;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 22px 45px -35px rgba(65, 92, 115, .45);
}
.csp-resource-card .wp-block-post-title { margin: 0 0 14px; font-size: 19px; font-weight: 500; line-height: 1.45; }
.csp-resource-card .wp-block-post-title a { color: var(--csp-ink); text-decoration: none; }
.csp-resource-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 7px;
  margin-bottom: 12px;
  color: #9b8585;
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 14px;
}
.csp-resource-card__meta a { color: #9b8585; text-decoration: none; }
.csp-resource-card .wp-block-post-excerpt { font-size: 15px; line-height: 1.9; }
.csp-resource-card .wp-block-post-excerpt__more-link { color: var(--csp-blue); }
.csp-resources-grid .wp-block-query-pagination { width: min(100%, 1090px); margin: 55px auto 0; }

/* Single posts and archives */
.csp-post-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  width: min(100% - 60px, 1100px);
  min-height: 690px;
  margin: 0 auto;
}
.csp-post-main { min-width: 0; padding: 58px 46px 90px 0; }
.csp-post-main .wp-block-post-title { margin-bottom: 8px; font-size: clamp(1.8rem, 2.5vw, 2.3rem); font-weight: 400; line-height: 1.15; }
.csp-post-meta { display: flex; flex-wrap: wrap; gap: 5px 9px; margin-bottom: 20px; color: #8c7777; font-family: "Open Sans", Arial, sans-serif; font-size: 14px; }
.csp-post-meta a { color: #8c7777; text-decoration: none; }
.csp-post-content { min-width: 0; color: #5f6870; font-family: "Open Sans", Arial, sans-serif; font-size: 15px; line-height: 1.75; overflow-wrap: anywhere; }
.csp-post-content .wp-block-embed,
.csp-post-content .wp-block-embed__wrapper,
.csp-post-content iframe,
.csp-post-content embed,
.csp-post-content object,
.csp-post-content video {
  display: block;
  width: 100% !important;
  max-width: 100%;
}
.csp-post-content iframe[src*="youtube.com"],
.csp-post-content iframe[src*="youtube-nocookie.com"],
.csp-post-content iframe[src*="youtu.be"] {
  height: auto !important;
  aspect-ratio: 16 / 9;
  border: 0;
}
.csp-post-content a:not(.csp-button) {
  display: inline-flex;
  margin-top: 20px;
  padding: 10px 16px;
  border: 1px solid #178ef5;
  border-radius: 9px;
  background: #75b5f4;
  color: #245780;
  text-decoration: none;
}
.csp-post-sidebar { padding: 58px 0 80px 30px; border-left: 1px solid #e3e3e3; }
.csp-post-sidebar h2 { font-size: 20px; font-weight: 400; }
.csp-post-sidebar .wp-block-categories-list { margin: 0; padding: 0; list-style: none; }
.csp-post-sidebar .wp-block-categories-list ul { padding-left: 18px; list-style: none; }
.csp-post-sidebar .wp-block-categories-list a { color: #806d6d; font-family: "Open Sans", Arial, sans-serif; font-size: 14px; text-decoration: none; }
.csp-archive { padding: 80px max(30px, 8vw) 110px; }
.csp-archive .wp-block-post-template { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; padding: 0; }

/* Footer */
.csp-site-footer { position: relative; overflow: hidden; padding: 82px 35px 24px; background: var(--csp-footer); color: #fff; }
.csp-site-footer::after {
  content: "";
  position: absolute;
  left: -5%;
  right: -5%;
  bottom: 52px;
  height: 80px;
  border-radius: 50% 50% 0 0;
  background: rgba(255,255,255,.035);
  transform: rotate(-2deg);
}
.csp-footer-inner { position: relative; z-index: 1; width: min(100%, 1100px); margin: 0 auto; text-align: center; }
.csp-footer-icon { width: 64px; height: 64px; margin: 0 auto 18px; color: #fff; }
.csp-site-footer h2 { margin-bottom: 14px; color: #fff; font-size: 38px; }
.csp-footer-lead { max-width: 720px; margin: 0 auto 55px; }
.csp-footer-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 45px; text-align: left; }
.csp-footer-item { display: grid; grid-template-columns: 42px 1fr; gap: 15px; font-family: "Open Sans", Arial, sans-serif; font-size: 14px; line-height: 1.7; }
.csp-footer-item svg { width: 34px; height: 34px; color: #fff; }
.csp-footer-item a { color: #fff; text-decoration: none; }
.csp-footer-legal { position: relative; z-index: 2; width: min(100%, 1100px); margin: 68px auto 0; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.16); font-family: "Open Sans", Arial, sans-serif; font-size: 12px; text-align: left; }
.csp-footer-legal a { color: #fff; text-decoration: none; text-transform: uppercase; }

@media (max-width: 1200px) {
  .csp-main-navigation .wp-block-navigation__container { gap: 15px; }
  .csp-main-navigation { font-size: 12px; }
  .csp-hero__content { padding-left: 7vw; }
  .csp-resources-grid .wp-block-post-template { gap: 30px; }
}

@media (max-width: 980px) {
  .csp-header-inner { width: min(100% - 40px, 920px); }
  .csp-header-inner .custom-logo { width: 180px; }
  .csp-main-navigation .wp-block-navigation__responsive-container-open { display: flex; }
  .csp-main-navigation .wp-block-navigation__responsive-container:not(.is-menu-open) { display: none; }
  .csp-main-navigation .wp-block-navigation__responsive-container.is-menu-open { padding: 36px; background: #fff; color: var(--csp-ink); }
  .csp-main-navigation .wp-block-navigation__responsive-container.is-menu-open a { color: var(--csp-ink); font-size: 18px; }
  .csp-hero { grid-template-columns: 1fr; }
  .csp-hero__content { max-width: none; padding: 70px 50px 45px; }
  .csp-hero__media { padding-left: 35px; }
  .csp-hero__media img { min-height: 430px; max-height: 520px; }
  .csp-split { grid-template-columns: 1fr; }
  .csp-split__image img { min-height: 420px; }
  .csp-team-grid { gap: 32px; }
  .csp-resources-grid .wp-block-post-template,
  .csp-archive .wp-block-post-template { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .csp-post-shell { grid-template-columns: 1fr; }
  .csp-post-main { padding-right: 0; }
  .csp-post-sidebar { padding: 35px 0 70px; border-top: 1px solid #e3e3e3; border-left: 0; }
  .csp-footer-columns { grid-template-columns: 1fr; max-width: 620px; margin: 0 auto; }
}

@media (max-width: 700px) {
  body { font-size: 15px; }
  .csp-site-header, .csp-header-inner { min-height: 72px; }
  .csp-header-inner { width: calc(100% - 30px); }
  .csp-header-inner .custom-logo { width: 155px; }
  .csp-hero__content { padding: 55px 28px 40px; }
  .csp-hero__content h1 { margin-bottom: 28px; }
  .csp-hero__content p { font-size: 16px; line-height: 1.75; }
  .csp-hero__content .csp-button { margin-top: 25px; }
  .csp-hero__media { padding-left: 22px; }
  .csp-hero__media img { min-height: 300px; border-left-width: 12px; box-shadow: -14px 0 0 rgba(0,0,0,.79); }
  .csp-home-intro { padding: 75px 24px; }
  .csp-split__image img { min-height: 310px; }
  .csp-split__content { padding: 55px 28px; }
  .csp-criteria, .csp-team-section, .csp-document, .csp-resources-grid, .csp-archive { padding-left: 24px; padding-right: 24px; }
  .csp-criteria-list li { padding-left: 58px; }
  .csp-criteria-list li::before { left: 20px; }
  .csp-team-grid,
  .csp-resources-grid .wp-block-post-template,
  .csp-archive .wp-block-post-template { grid-template-columns: 1fr; }
  .csp-team-card__body { padding: 28px 25px 34px; }
  .csp-post-shell { width: calc(100% - 40px); }
  .csp-post-main { padding-top: 42px; }
  .csp-site-footer { padding: 65px 24px 24px; }
  .csp-site-footer h2 { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
