/*
Theme Name: SVFOI
Theme URI: https://sv-foi.ch/
Author: SVFOI
Description: Schlankes, eigenständiges WordPress-Theme für den Schweizer Verband für Funktionelle Orthonomie und Integration.
Version: 1.0.2
Requires at least: 6.7
Requires PHP: 8.1
Text Domain: svfoi
*/

:root {
  --svfoi-navy: #091759;
  --svfoi-navy-dark: #06103f;
  --svfoi-green: #789904;
  --svfoi-green-dark: #5f7903;
  --svfoi-ink: #17203a;
  --svfoi-muted: #5b6475;
  --svfoi-line: #dfe3ea;
  --svfoi-soft: #f4f6f1;
  --svfoi-white: #ffffff;
  --svfoi-max: 1180px;
  --svfoi-radius: 18px;
  --svfoi-shadow: 0 18px 45px rgba(9, 23, 89, 0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--svfoi-ink);
  background: var(--svfoi-white);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--svfoi-navy); text-underline-offset: 3px; }
a:hover { color: var(--svfoi-green-dark); }
h1, h2, h3, h4 {
  color: var(--svfoi-navy);
  font-weight: 720;
  line-height: 1.14;
  letter-spacing: -0.025em;
  margin: 0 0 0.65em;
}
h1 { font-size: clamp(2.55rem, 6vw, 5.1rem); }
h2 { font-size: clamp(2rem, 3.7vw, 3.25rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); }
p { margin: 0 0 1.2em; }

.screen-reader-text {
  clip: rect(1px,1px,1px,1px);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}
.screen-reader-text:focus {
  clip: auto !important;
  clip-path: none;
  height: auto;
  width: auto;
  display: block;
  z-index: 100000;
  top: 8px;
  left: 8px;
  padding: 14px 18px;
  background: white;
  color: var(--svfoi-navy);
}
.svfoi-container { width: min(calc(100% - 40px), var(--svfoi-max)); margin-inline: auto; }
.svfoi-section { padding: clamp(72px, 9vw, 120px) 0; }
.svfoi-section--soft { background: var(--svfoi-soft); }
.svfoi-section--navy { background: var(--svfoi-navy); color: white; }
.svfoi-section--navy h2, .svfoi-section--navy h3 { color: white; }
.svfoi-eyebrow {
  color: var(--svfoi-green-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.svfoi-lead { font-size: clamp(1.08rem, 1.7vw, 1.3rem); color: var(--svfoi-muted); max-width: 760px; }
.svfoi-section--navy .svfoi-lead { color: rgba(255,255,255,.78); }
.svfoi-section--navy .svfoi-point p { color: rgba(255,255,255,.78); }

.svfoi-button,
.wp-element-button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 12px 22px;
  border: 2px solid var(--svfoi-green);
  border-radius: 999px;
  background: var(--svfoi-green);
  color: white;
  font: inherit;
  font-weight: 760;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.svfoi-button:hover { background: var(--svfoi-green-dark); border-color: var(--svfoi-green-dark); color: white; transform: translateY(-1px); }
.svfoi-button--outline { background: transparent; color: var(--svfoi-navy); border-color: var(--svfoi-navy); }
.svfoi-button--outline:hover { background: var(--svfoi-navy); border-color: var(--svfoi-navy); color: white; }
.svfoi-button--light { background: white; border-color: white; color: var(--svfoi-navy); }
.svfoi-button--light:hover { background: var(--svfoi-soft); border-color: var(--svfoi-soft); color: var(--svfoi-navy); }
.svfoi-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid rgba(9,23,89,.09);
  backdrop-filter: blur(14px);
}
.admin-bar .site-header { top: 32px; }
.site-header__inner { min-height: 92px; display: flex; align-items: center; gap: 30px; }
.site-header .svfoi-container { width: min(calc(100% - 40px), 1440px); }
.site-branding { flex: 0 0 auto; display: flex; align-items: center; gap: 15px; }
.site-branding__mark { display: flex; align-items: center; }
.site-branding img { display: block; width: auto; height: 48px; max-width: 230px; object-fit: contain; object-position: left center; }
.site-branding__fallback { display: flex; align-items: center; text-decoration: none; }
.site-branding__fallback img { height: 62px; }
.site-branding__name {
  display: flex;
  flex-direction: column;
  padding-left: 15px;
  border-left: 1px solid rgba(9,23,89,.2);
  color: var(--svfoi-navy);
  font-size: .72rem;
  font-weight: 760;
  line-height: 1.28;
  letter-spacing: .015em;
  text-decoration: none;
  white-space: nowrap;
}
.site-branding__name:hover { color: var(--svfoi-navy); }
.primary-navigation { display: none; }
.primary-navigation ul { display: flex; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; }
.primary-navigation a { color: var(--svfoi-ink); text-decoration: none; font-size: .94rem; font-weight: 680; white-space: nowrap; }
.primary-navigation a:hover, .primary-navigation .current-menu-item > a { color: var(--svfoi-green-dark); }
.menu-toggle {
  display: inline-grid;
  place-items: center;
  margin-left: auto;
  width: 46px;
  height: 46px;
  border: 1px solid var(--svfoi-line);
  border-radius: 50%;
  background: white;
  color: var(--svfoi-navy);
  font-size: 1.45rem;
}

.svfoi-hero {
  position: relative;
  isolation: isolate;
  min-height: min(680px, calc(100svh - 92px));
  display: flex;
  align-items: center;
  color: white;
  background-color: var(--svfoi-navy);
  background-image: linear-gradient(90deg, rgba(4,14,58,.91) 0%, rgba(4,14,58,.72) 42%, rgba(4,14,58,.22) 76%, rgba(4,14,58,.08) 100%), var(--svfoi-hero-image);
  background-size: cover;
  background-position: center;
}
.svfoi-hero__content { max-width: 770px; padding: 90px 0; }
.svfoi-hero .svfoi-eyebrow { color: #bdd369; font-size: clamp(.92rem, 1.25vw, 1.08rem); line-height: 1.4; }
.svfoi-hero h1 { color: white; font-size: clamp(3rem, 6vw, 5.6rem); max-width: 830px; text-wrap: balance; }
.svfoi-hero p { max-width: 680px; font-size: clamp(1.08rem, 1.8vw, 1.32rem); color: rgba(255,255,255,.88); }
.svfoi-hero .svfoi-button--outline { color: white; border-color: rgba(255,255,255,.72); }
.svfoi-hero .svfoi-button--outline:hover { background: white; color: var(--svfoi-navy); border-color: white; }

.svfoi-paths { position: relative; z-index: 3; margin-top: -60px; }
.svfoi-grid { display: grid; gap: 24px; }
.svfoi-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.svfoi-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.svfoi-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.svfoi-card {
  padding: 34px;
  border: 1px solid var(--svfoi-line);
  border-radius: var(--svfoi-radius);
  background: white;
  box-shadow: var(--svfoi-shadow);
}
.svfoi-card h3 { margin-bottom: 12px; }
.svfoi-card p { color: var(--svfoi-muted); }
.svfoi-card__link { display: inline-flex; gap: 8px; align-items: center; color: var(--svfoi-green-dark); font-weight: 760; text-decoration: none; }
.svfoi-card__link::after { content: "→"; transition: transform .18s ease; }
.svfoi-card__link:hover::after { transform: translateX(3px); }
.svfoi-split { display: grid; grid-template-columns: 1.04fr .96fr; gap: clamp(45px, 8vw, 100px); align-items: center; }
.svfoi-points { display: grid; gap: 18px; }
.svfoi-point { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.svfoi-icon { display: grid; place-items: center; width: 44px; height: 44px; color: var(--svfoi-green-dark); }
.svfoi-icon svg { width: 100%; height: 100%; }
.svfoi-section--navy .svfoi-icon { color: #bdd369; }
.svfoi-point h3 { margin: 5px 0 5px; }
.svfoi-point p { color: var(--svfoi-muted); margin: 0; }
.svfoi-person { text-align: left; box-shadow: none; overflow: hidden; }
.svfoi-subheading { font-size: 1rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--svfoi-muted); margin: 0; }
.svfoi-subheading--spaced { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--svfoi-line); }
.svfoi-note { max-width: 760px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--svfoi-line); color: var(--svfoi-muted); }

.svfoi-form-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.svfoi-form-row { margin-bottom: 18px; }
.svfoi-form-row label { display: block; margin-bottom: 6px; font-weight: 760; font-size: .92rem; color: var(--svfoi-navy); }
.svfoi-form-row input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--svfoi-line);
  border-radius: 10px;
  font: inherit;
  font-size: .96rem;
  color: var(--svfoi-ink);
  background: white;
}
.svfoi-form-row input:focus { outline: none; border-color: var(--svfoi-green); box-shadow: 0 0 0 3px rgba(120,153,4,.15); }
.svfoi-form-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 16px; }
.svfoi-form-fieldset { border: none; padding: 0; margin: 0 0 18px; }
.svfoi-form-fieldset legend { font-weight: 760; font-size: .92rem; color: var(--svfoi-navy); margin-bottom: 8px; padding: 0; }
.svfoi-form-radio { display: inline-flex; align-items: center; gap: 6px; margin-right: 22px; font-size: .95rem; color: var(--svfoi-ink); font-weight: 400; }
.svfoi-form-radio input { width: auto; }
.svfoi-form-consent { margin-top: 16px; font-size: .84rem; color: var(--svfoi-muted); }
.svfoi-form-errors { margin-bottom: 20px; padding: 14px 18px; border-radius: 10px; background: #fdeeee; border: 1px solid #e8b4b4; }
.svfoi-form-errors ul { margin: 0; padding-left: 1.1em; }
.svfoi-form-errors li { color: #9a2c2c; font-size: .92rem; }
@media (max-width: 560px) {
  .svfoi-form-grid { grid-template-columns: 1fr; }
}
.svfoi-person__photo { margin: -34px -34px 20px; aspect-ratio: 3 / 4; overflow: hidden; background: #f4f0e8; border-radius: var(--svfoi-radius) var(--svfoi-radius) 0 0; }
.svfoi-person__photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.svfoi-person small { display: block; color: var(--svfoi-green-dark); font-weight: 760; line-height: 1.35; }
.svfoi-current-grid { margin-top: 34px; }
.svfoi-current-card time { display: block; margin-bottom: 10px; color: var(--svfoi-green-dark); font-size: .86rem; font-weight: 760; }
.svfoi-current-stack { display: flex; flex-direction: column; gap: 20px; }
.svfoi-badge { display: inline-block; margin-bottom: 12px; padding: 4px 12px; border-radius: 999px; background: var(--svfoi-navy); color: white; font-size: .74rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.svfoi-current-card h3 a { color: var(--svfoi-navy); text-decoration: none; }
.svfoi-current-empty { max-width: 760px; margin-top: 34px; box-shadow: none; }

.entry-hero { padding: 86px 0 55px; background: var(--svfoi-soft); border-bottom: 1px solid var(--svfoi-line); }
.entry-hero h1 { max-width: 900px; font-size: clamp(2.5rem, 5vw, 4.4rem); }
.entry-content { width: min(calc(100% - 40px), 860px); margin: 0 auto; padding: 70px 0 20px; }
.entry-content > * { max-width: 100%; }
.entry-content h2 { margin-top: 1.7em; }
.entry-content h3 { margin-top: 1.6em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content blockquote { margin: 2em 0; padding: 4px 0 4px 24px; border-left: 4px solid var(--svfoi-green); color: var(--svfoi-muted); }
.entry-content .wp-block-button__link { border-radius: 999px; }

.posts-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; }
.post-card { border: 1px solid var(--svfoi-line); border-radius: var(--svfoi-radius); overflow: hidden; background: white; }
.post-card__content { padding: 28px; }
.post-card time { color: var(--svfoi-green-dark); font-size: .88rem; font-weight: 740; }
.post-card h2 { font-size: 1.45rem; margin-top: 8px; }
.post-card h2 a { text-decoration: none; }

.site-footer { background: var(--svfoi-navy-dark); color: rgba(255,255,255,.78); }
.site-footer__main { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 60px; padding: 70px 0 50px; }
.site-footer h2, .site-footer h3 { color: white; }
.site-footer h3 { font-size: 1.05rem; }
.site-footer a { color: white; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer__logo { width: 220px; max-height: 86px; object-fit: contain; object-position: left center; filter: brightness(0) invert(1); opacity: .98; margin-bottom: 22px; }
.site-footer__bottom { padding: 20px 0 28px; border-top: 1px solid rgba(255,255,255,.13); font-size: .86rem; }

.site-header.is-open .primary-navigation {
  display: block;
  position: absolute;
  top: 92px;
  right: max(20px, calc((100vw - 1440px) / 2 + 20px));
  width: min(420px, calc(100vw - 40px));
  padding: 18px 26px 24px;
  background: white;
  border: 1px solid var(--svfoi-line);
  border-radius: 0 0 18px 18px;
  box-shadow: var(--svfoi-shadow);
}
.site-header.is-open .primary-navigation > ul { align-items: stretch; flex-direction: column; gap: 0; }
.site-header.is-open .primary-navigation a { display: block; padding: 11px 0; }
.site-header.is-open .primary-navigation .sub-menu { display: block; padding: 0 0 8px 18px; }
.site-header.is-open .primary-navigation .sub-menu a { padding: 7px 0; color: var(--svfoi-muted); font-size: .88rem; }

@media (max-width: 1280px) {
  .svfoi-grid--4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 1024px) {
  .site-header .svfoi-container { width: min(calc(100% - 32px), var(--svfoi-max)); }
  .svfoi-hero h1 { font-size: clamp(3rem, 6.8vw, 4.65rem); }
  .svfoi-paths h2 { font-size: clamp(1.65rem, 3.2vw, 2.25rem); }
}
@media (max-width: 560px) {
  .site-branding__name { display: none; }
}
@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
  .svfoi-container { width: min(calc(100% - 28px), var(--svfoi-max)); }
  .site-header__inner { min-height: 78px; }
  .site-branding img, .site-branding__fallback img { height: 40px; max-width: 190px; }
  .site-header.is-open .primary-navigation { top: 78px; right: 14px; width: calc(100vw - 28px); }
  .svfoi-hero { min-height: 600px; background-position: 58% center; background-image: linear-gradient(90deg, rgba(4,14,58,.92) 0%, rgba(4,14,58,.74) 68%, rgba(4,14,58,.34) 100%), var(--svfoi-hero-image); }
  .svfoi-hero__content { padding: 78px 0; }
  .svfoi-grid--2, .svfoi-grid--3, .svfoi-grid--4, .svfoi-split, .posts-grid, .site-footer__main { grid-template-columns: 1fr; }
  .svfoi-paths { margin-top: -45px; }
  .svfoi-card { padding: 28px; }
  .site-footer__main { gap: 34px; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .svfoi-hero h1 { font-size: 2.7rem; }
  .svfoi-actions { align-items: stretch; flex-direction: column; }
  .svfoi-actions .svfoi-button { width: 100%; }
}

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