/* ==========================================================================
   Akademie für Existenzanalyse & Logotherapie — redesign
   Palette derived from the original existenzanalyse.com:
     brand red  #992821   cream  #FCE7C8   background  #FEFEFE
     text  #333333        muted grey  #F1F1F1   divider  #E4E8ED
   ========================================================================== */

:root {
   --brand: #992821;
   --brand-dark: #7c1f1a;
   --brand-tint: #f4e6e4;
   --cream: #fce7c8;
   --cream-soft: #fdf6ec;
   --bg: #fefefe;
   --text: #333333;
   --muted: #666666;
   --grey: #f1f1f1;
   --divider: #e4e8ed;
   --ink: #1c1c1c;
   --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
   --sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
   --maxw: 1140px;
   --radius: 10px;
   --shadow: 0 1px 2px rgba(20, 20, 20, 0.04), 0 8px 24px rgba(20, 20, 20, 0.06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
   margin: 0;
   font-family: var(--sans);
   font-size: 17px;
   line-height: 1.65;
   color: var(--text);
   background: var(--bg);
   -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); line-height: 1.2; font-weight: 600; margin: 0 0 0.5em; }
h1 { font-size: clamp(1.9rem, 3.4vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.3rem; }
p  { margin: 0 0 1.1em; }
a  { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
strong { color: var(--ink); }

.skip-link {
   position: absolute; left: -999px; top: 0; background: var(--brand); color: #fff;
   padding: 0.6em 1em; border-radius: 0 0 var(--radius) 0; z-index: 100;
}
.skip-link:focus { left: 0; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section--grey { background: var(--grey); }
.section--cream { background: var(--cream-soft); }
.section-head { max-width: 46rem; margin: 0 0 2.5rem; }
.section-head h2 { margin-bottom: 0.35em; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.eyebrow {
   display: inline-block; font-family: var(--sans); font-weight: 700; letter-spacing: 0.14em;
   text-transform: uppercase; font-size: 0.72rem; color: var(--brand); margin-bottom: 0.6rem;
}

/* ---------- Buttons ---------- */
.btn {
   display: inline-block; padding: 0.7em 1.5em; border-radius: 999px;
   font-weight: 600; font-size: 0.98rem; border: 2px solid transparent;
   transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); }
.btn--ghost { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn--ghost:hover { background: var(--brand-tint); }
.btn--on-cream { background: rgba(255,255,255,0.75); color: var(--brand); border-color: rgba(153,40,33,0.25); }
.btn--on-cream:hover { background: #fff; }

/* ---------- Masthead ---------- */
.site-header {
   background: var(--cream);
   border-bottom: 1px solid rgba(153, 40, 33, 0.12);
   position: sticky; top: 0; z-index: 50;
}
.header-inner {
   max-width: var(--maxw); margin: 0 auto; padding: 0.75rem 1.25rem;
   display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: 0.85rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-logo { width: 46px; height: 46px; }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 1.02rem; line-height: 1.15; }

.main-nav .nav-list {
   list-style: none; display: flex; gap: 1.4rem; margin: 0; padding: 0; align-items: center;
}
.main-nav a { color: var(--ink); font-weight: 600; font-size: 0.96rem; }
.main-nav a:hover { color: var(--brand); text-decoration: none; }
.nav-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; display: block; }

/* ---------- Hero ---------- */
.hero {
   background: linear-gradient(120deg, var(--cream) 0%, var(--cream-soft) 60%, #fff 100%);
   border-bottom: 1px solid var(--divider);
}
.hero-inner {
   max-width: var(--maxw); margin: 0 auto; padding: clamp(3rem, 7vw, 5.5rem) 1.25rem;
   display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.hero h1 { font-size: clamp(2.1rem, 4.2vw, 3.4rem); margin-bottom: 0.5em; }
.hero-sub { font-size: 1.2rem; color: var(--muted); max-width: 34rem; margin-bottom: 1.6rem; }
.hero-figure { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.hero-figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }

/* ---------- Card grids ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.5rem; }
.card-grid--events { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card {
   display: flex; flex-direction: column; background: #fff; border: 1px solid var(--divider);
   border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
   transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(20,20,20,0.10); }
.card:hover a.card-link { text-decoration: none; }
.card-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--grey); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 1.25rem 1.35rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.card-meta { color: var(--muted); font-size: 0.86rem; margin: 0 0 0.4rem; }
.card h3 { font-size: 1.15rem; margin-bottom: 0.35rem; }
.card p { font-size: 0.95rem; color: var(--text); margin: 0 0 1rem; flex: 1; }
.card-link { font-weight: 600; font-size: 0.9rem; color: var(--brand); align-self: flex-start; }
.card-link::after { content: " →"; }
.card-event .card-meta { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ---------- Prose (article body) ---------- */
.prose { max-width: 48rem; }
.prose > * + * { margin-top: 1rem; }
.prose h2 { margin-top: 2rem; padding-bottom: 0.3rem; border-bottom: 2px solid var(--brand-tint); }
.prose h3 { margin-top: 1.6rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li + li { margin-top: 0.35rem; }
.prose blockquote {
   border-left: 4px solid var(--brand); margin: 1.5rem 0; padding: 0.2rem 0 0.2rem 1.25rem;
   font-family: var(--serif); font-size: 1.15rem; color: var(--ink); font-style: italic;
}
.prose blockquote cite { display: block; font-size: 0.85rem; font-style: normal; color: var(--muted); margin-top: 0.5rem; }
.prose figure { margin: 2rem 0; text-align: center; }
.prose figure img { border-radius: var(--radius); box-shadow: var(--shadow); }
.prose figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 0.6rem; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.prose th, .prose td { border: 1px solid var(--divider); padding: 0.5rem 0.7rem; text-align: left; }
.prose th { background: var(--grey); }
.prose .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }

/* ---------- Person / Institute ---------- */
.profile { display: grid; grid-template-columns: 280px 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.profile-photo { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 3 / 4; }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.contact-box { background: var(--cream-soft); border: 1px solid rgba(153,40,33,0.12); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.contact-box h3 { margin-top: 0; font-size: 1.05rem; }
.contact-box address { font-style: normal; line-height: 1.7; }
.list-bare { list-style: none; padding: 0; margin: 0; }
.list-bare li { padding: 0.35rem 0; border-bottom: 1px solid var(--divider); }
.list-bare li:last-child { border-bottom: 0; }
.meta-row { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.meta-chip { background: var(--brand-tint); color: var(--brand); border-radius: 999px; padding: 0.2rem 0.8rem; font-size: 0.82rem; font-weight: 600; }

/* ---------- Page header band ---------- */
.page-header { background: var(--cream); border-bottom: 1px solid rgba(153,40,33,0.12); }
.page-header-inner { max-width: var(--maxw); margin: 0 auto; padding: clamp(2.2rem, 5vw, 3.5rem) 1.25rem; }
.page-header h1 { margin-bottom: 0.2em; }
.page-header .lead { font-size: 1.15rem; color: var(--muted); max-width: 42rem; }

/* ---------- Footer ---------- */
.site-footer { background: #1f1f1f; color: #d9d9d9; margin-top: 4rem; }
.footer-inner {
   max-width: var(--maxw); margin: 0 auto; padding: 3rem 1.25rem 2rem;
   display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem;
}
.footer-logo { width: 54px; height: 54px; filter: brightness(0) invert(1); opacity: 0.9; }
.footer-tagline { color: #b3b3b3; font-size: 0.95rem; }
.footer-headline { color: #fff; font-size: 1rem; margin-bottom: 0.9rem; }
.footer-nav { list-style: none; padding: 0; margin: 0; }
.footer-nav li { padding: 0.25rem 0; }
.footer-nav a { color: #d9d9d9; font-size: 0.93rem; }
.footer-nav a:hover { color: #fff; }
.footer-city { color: #9a9a9a; }
.footer-gle a { color: #fff; font-weight: 700; font-family: var(--serif); }
.footer-gle span { display: block; color: #a9a9a9; font-size: 0.85rem; margin-top: 0.2rem; }
.footer-fineprint { color: #8a8a8a; font-size: 0.8rem; margin-top: 1.5rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
   .hero-inner { grid-template-columns: 1fr; }
   .footer-inner { grid-template-columns: 1fr 1fr; }
   .profile { grid-template-columns: 1fr; }
   .prose .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
   .nav-toggle { display: flex; }
   .main-nav .nav-list {
      position: absolute; top: 100%; right: 0; left: 0;
      flex-direction: column; gap: 0; background: var(--cream);
      border-bottom: 1px solid rgba(153,40,33,0.15);
      max-height: 0; overflow: hidden; transition: max-height 0.2s ease;
      padding: 0 1.25rem;
   }
   .main-nav.open .nav-list { max-height: 32rem; padding: 0.5rem 1.25rem 1rem; }
   .main-nav .nav-list li { width: 100%; border-bottom: 1px solid rgba(153,40,33,0.1); }
   .main-nav .nav-list a { display: block; padding: 0.7rem 0; }
   .footer-inner { grid-template-columns: 1fr; }
}

/* ---------- Captcha & forms (self-hosted, no external provider) ---------- */
.captcha {
  margin: 1.25rem 0 1.5rem;
  padding: 1.15rem 1.35rem;
  background: var(--cream-soft);
  border: 1px solid rgba(153, 40, 33, 0.14);
  border-radius: var(--radius);
}
.captcha-question {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
  margin: 0 0 0.6rem;
}
.captcha-input input[type="number"] {
  font-size: 1.1rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--divider);
  border-radius: 8px;
  background: #fff;
  max-width: 10rem;
}
.captcha-input input[type="number"]:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
  border-color: var(--brand);
}

/* Honeypot: present in the DOM (so a bot that fills every field hits it) but
  visually hidden and removed from the tab order and a11y tree for humans. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

/* Demo form */
.form-demo {
  max-width: 34rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.form-row label {
  font-weight: 600;
  color: var(--ink);
  font-size: 0.95rem;
}
.form-row input,
.form-row textarea {
  font-family: var(--sans);
  font-size: 1rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--divider);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}
.form-row input:focus,
.form-row textarea:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
  border-color: var(--brand);
}
.captcha-explain {
  max-width: 34rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.75rem;
}
.captcha-explain li { padding: 0.4rem 0; border-bottom: 1px solid var(--divider); }
.captcha-explain li:last-child { border-bottom: 0; }

/* Field-level error text */
.field-error {
  display: block;
  color: var(--brand-dark);
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.35rem;
}

/* Success / status alerts */
.alert { border-radius: var(--radius); padding: 1rem 1.25rem; margin: 0 0 1.5rem; }
.alert--success {
  background: #e7f4ea;
  border: 1px solid #bfe0c8;
  color: #1f5a33;
}
.alert--success p { margin: 0; }

/* ---------- Event / booking ---------- */
.meta-chip--type {
  background: var(--brand);
  color: #fff;
}
.meta-chip--full {
  background: var(--brand-tint);
  color: var(--brand-dark);
  text-decoration: line-through;
}
.btn--inline {
  background: var(--brand-tint);
  color: var(--brand);
}
.btn--inline:hover {
  background: #fff;
}

/* Booking form (inline on the event page) */
.booking .form-field {
  margin: 0 0 1.1rem;
}
.booking label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
}
.booking input,
.booking textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--divider);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}
.booking input:focus,
.booking textarea:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
  border-color: var(--brand);
}
.field-help {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 0.25rem;
}
.form-errors {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  color: var(--brand-dark);
  font-weight: 600;
}
.form-errors li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--divider);
}
.form-errors li:last-child {
  border-bottom: 0;
}
