/*
  Stilles-Coaching.ch
  Zentrale Gestaltung für die statische Website ohne Framework und JavaScript.
*/

:root {
  /* Farbwerte aus der vorhandenen Whiteboard-Gestaltung abgeleitet */
  --color-paper: #fdfdfd;
  --color-paper-muted: #f2f5f3;
  --color-ink: #202820;
  --color-ink-soft: #43513a;
  --color-blue-pale: #d0eaf9;
  --color-blue: #77b9e6;
  --color-blue-deep: #123a55;
  --color-green-pale: #d2e89e;
  --color-green: #8eb846;
  --color-green-deep: #405d18;
  --color-line: #d0d0d0;
  --color-focus: #ffd43b;

  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;

  --step--1: clamp(0.82rem, 0.8rem + 0.1vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  --step-1: clamp(1.25rem, 1.12rem + 0.6vw, 1.65rem);
  --step-2: clamp(1.75rem, 1.4rem + 1.5vw, 2.75rem);
  --step-3: clamp(2.35rem, 1.65rem + 3.2vw, 4.8rem);

  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: clamp(4rem, 8vw, 8rem);

  --content-width: 76rem;
  --text-width: 46rem;
  --header-height: 5rem;
  --line-width: 2px;
  --shadow-soft: 0 1rem 3rem rgb(9 34 50 / 18%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  min-width: 20rem;
  min-height: 100vh;
  margin: 0;
  color: var(--color-ink);
  background: var(--color-paper);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

/*
  Kennzeichnet externe Links (absolute https-URLs) automatisch mit einem
  kleinen Pfeil-Symbol. .social-link ist ausgenommen, da diese Links nur
  ein Icon ohne sichtbaren Text enthalten.
*/
a[href^="https://"]:not(.social-link)::after {
  content: "↗";
  display: inline-block;
  margin-left: 0.2em;
  font-size: 0.75em;
  text-decoration: none;
  transform: translateY(-0.08em);
}

a:focus-visible,
summary:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: var(--space-3);
  left: var(--space-3);
  padding: var(--space-2) var(--space-3);
  color: var(--color-paper);
  background: var(--color-ink);
  border-radius: 0.5rem;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Header und Hauptnavigation */

.site-header {
  position: relative;
  z-index: 20;
  min-height: var(--header-height);
  background: rgb(253 253 253 / 96%);
  border-bottom: var(--line-width) solid var(--color-ink);
}

.header-inner,
.hero-inner,
.footer-inner {
  width: min(100% - 2 * var(--space-4), var(--content-width));
  margin-inline: auto;
}

.header-inner {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.text-logo {
  position: relative;
  flex: 0 0 auto;
  padding-block: 0.2rem;
  font-size: var(--step-1);
  font-weight: 780;
  line-height: 1.1;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.text-logo::after {
  position: absolute;
  right: 0.05em;
  bottom: -0.22rem;
  left: -0.08em;
  height: 0.2rem;
  content: "";
  background: var(--color-green);
  border-radius: 60% 35% 55% 30%;
  transform: rotate(-0.7deg);
}

.desktop-navigation {
  display: none;
}

.desktop-navigation ul,
.site-navigation ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.desktop-navigation a,
.site-navigation a {
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-weight: 650;
  text-decoration: none;
  border-radius: 0.45rem;
}

.desktop-navigation a:hover,
.desktop-navigation a[aria-current="page"],
.site-navigation a:hover,
.site-navigation a[aria-current="page"] {
  background: var(--color-blue-pale);
}

.desktop-navigation a[aria-current="page"],
.site-navigation a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 0.16rem;
  text-underline-offset: 0.28rem;
  text-decoration-color: var(--color-blue-deep);
}

.site-navigation summary {
  min-width: 3rem;
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-2);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  border: var(--line-width) solid var(--color-ink);
  border-radius: 0.8rem 0.65rem 0.85rem 0.6rem;
  background: var(--color-paper);
}

.site-navigation summary::-webkit-details-marker {
  display: none;
}

.menu-icon {
  width: 1.35rem;
  display: grid;
  gap: 0.25rem;
}

.menu-icon span {
  height: 2px;
  background: var(--color-ink);
  border-radius: 1rem;
}

.site-navigation nav {
  position: absolute;
  top: calc(100% + 0.1rem);
  right: var(--space-4);
  left: var(--space-4);
  padding: var(--space-3);
  background: var(--color-paper);
  border: var(--line-width) solid var(--color-ink);
  border-top: 0;
  box-shadow: var(--shadow-soft);
}

.site-navigation ul {
  display: grid;
  gap: var(--space-1);
}

/* Reduzierte Startseite: Hero als einziger Inhaltsbereich */

.hero {
  min-height: clamp(36rem, calc(100svh - var(--header-height)), 58rem);
  display: grid;
  align-items: center;
  color: var(--color-paper);
  background-color: var(--color-blue-deep);
  background-image:
    linear-gradient(
      90deg,
      rgb(8 34 51 / 32%) 0%,
      rgb(8 34 51 / 48%) 38%,
      rgb(8 34 51 / 90%) 67%,
      rgb(8 34 51 / 98%) 100%
    ),
    url("img/hero-stilles-coaching.jpg");
  background-position: 48% center;
  background-size: cover;
}

.hero-inner {
  padding-block: var(--space-7);
}

.hero-content {
  width: min(100%, var(--text-width));
  margin-left: auto;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  background: rgb(8 34 51 / 54%);
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 1.4rem 1.05rem 1.3rem 0.95rem;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(2px);
}

.hero h1 {
  max-width: 16ch;
  margin: 0;
  font-size: var(--step-3);
  font-weight: 790;
  line-height: 1.04;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.hero-introduction {
  max-width: 58ch;
  margin: var(--space-5) 0 0;
  font-size: var(--step-0);
  line-height: 1.65;
}

.hero-call-to-action {
  max-width: 58ch;
  margin: var(--space-3) 0 0;
  color: var(--color-green-pale);
  font-weight: 720;
  line-height: 1.55;
}

.download-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.download-button {
  min-height: 4.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  color: #172312;
  background: var(--color-green-pale);
  border: var(--line-width) solid #172312;
  border-radius: 0.85rem 0.65rem 0.9rem 0.7rem;
  box-shadow: 0.28rem 0.32rem 0 #172312;
  font-size: var(--step--1);
  font-weight: 780;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}

.download-button:nth-child(even) {
  background: var(--color-blue-pale);
}

.download-button:hover {
  background: var(--color-paper);
}

.download-button:active {
  box-shadow: 0.12rem 0.14rem 0 #172312;
  transform: translate(0.16rem, 0.18rem);
}

.download-button > span:first-child {
  flex: 0 0 auto;
  font-size: 1.4em;
  line-height: 1;
}

/* Textlastige Unterseiten (User-Guide-Stil) */

.content-page {
  padding-block: var(--space-6) var(--space-7);
  background: var(--color-paper);
}

.content-inner {
  width: min(100% - 2 * var(--space-4), var(--text-width));
  margin-inline: auto;
}

.content-header {
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-5);
  border-bottom: var(--line-width) solid var(--color-line);
}

.content-eyebrow {
  margin: 0 0 var(--space-1);
  color: var(--color-green-deep);
  font-size: var(--step--1);
  font-weight: 780;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.content-header h1 {
  margin: 0;
  font-size: var(--step-2);
  font-weight: 790;
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.content-lead {
  max-width: 58ch;
  margin: var(--space-3) 0 0;
  color: var(--color-ink-soft);
  font-size: var(--step-0);
  line-height: 1.65;
}

.content-toc {
  margin-bottom: var(--space-6);
  padding: var(--space-4);
  background: var(--color-paper-muted);
  border: var(--line-width) solid var(--color-line);
  border-radius: 0.9rem 0.7rem 0.95rem 0.75rem;
}

.content-toc-title {
  margin: 0 0 var(--space-2);
  font-size: var(--step--1);
  font-weight: 780;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.content-toc ol {
  display: grid;
  gap: var(--space-1);
  margin: 0;
  padding-left: 1.2rem;
}

.content-toc a {
  font-weight: 650;
  text-decoration-thickness: 0.08rem;
  text-underline-offset: 0.2rem;
}

.content-page section {
  margin-top: var(--space-6);
}

.content-page h2 {
  margin: 0 0 var(--space-3);
  font-size: var(--step-1);
  font-weight: 760;
  line-height: 1.2;
  letter-spacing: -0.015em;
  scroll-margin-top: calc(var(--header-height) + var(--space-3));
}

.content-page h3 {
  margin: var(--space-5) 0 var(--space-2);
  font-size: var(--step-0);
  font-weight: 720;
  line-height: 1.3;
  scroll-margin-top: calc(var(--header-height) + var(--space-3));
}

.content-page p {
  max-width: var(--text-width);
  margin: var(--space-3) 0 0;
  color: var(--color-ink);
  line-height: 1.7;
}

.content-page ul,
.content-page ol {
  max-width: var(--text-width);
  margin: var(--space-3) 0 0;
  padding-left: 1.4rem;
  line-height: 1.7;
}

.content-page li + li {
  margin-top: var(--space-1);
}

.content-callout {
  max-width: var(--text-width);
  margin: var(--space-4) 0 0;
  padding: var(--space-3) var(--space-4);
  background: var(--color-blue-pale);
  border-left: 0.28rem solid var(--color-blue-deep);
  border-radius: 0 0.65rem 0.65rem 0;
}

.content-callout-title {
  margin: 0 0 var(--space-1);
  color: var(--color-blue-deep);
  font-weight: 780;
}

.content-callout p {
  margin-top: 0;
}

.content-callout p + p {
  margin-top: var(--space-2);
}

.content-back-to-top {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: var(--line-width) solid var(--color-line);
}

.content-back-to-top a {
  font-weight: 650;
  text-decoration-thickness: 0.08rem;
  text-underline-offset: 0.2rem;
}

.author-portrait {
  display: block;
  width: min(100%, 14rem);
  height: auto;
  margin: 0 0 var(--space-4);
  border-radius: 1rem 0.7rem 1rem 0.75rem;
  box-shadow: var(--shadow-soft);
}

@media (max-width: 38rem) {
  .content-inner {
    width: min(100% - 2 * var(--space-3), var(--text-width));
  }

  .content-page {
    padding-block: var(--space-5) var(--space-6);
  }

  .content-header h1 {
    font-size: var(--step-1);
  }
}

@media print {
  .content-toc {
    display: none;
  }
}

/* Footer */

.site-footer {
  color: var(--color-paper);
  background: var(--color-ink);
  border-top: 0.32rem solid var(--color-green);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-4);
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-4);
}

.footer-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-navigation a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-block: var(--space-1);
  color: #f5f7f5;
  font-size: var(--step--1);
  font-weight: 650;
  text-decoration: none;
}

/*
  Unterstreichung liegt auf dem inneren span statt auf dem Flex-Link selbst:
  Bei display:flex/inline-flex ziehen Browser die Linie sonst über die
  gesamte Box, auch über das ::after-Pfeilsymbol externer Links hinweg.
*/
.footer-navigation a span {
  text-decoration: underline;
  text-decoration-thickness: 0.08rem;
  text-underline-offset: 0.25rem;
}

.footer-navigation a:hover {
  color: var(--color-green-pale);
}

.social-links {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.social-link {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  color: var(--color-green-pale);
  transition: color 140ms ease, transform 140ms ease;
}

.social-link:hover,
.social-link:focus-visible {
  color: var(--color-paper);
  transform: translateY(-0.1rem);
}

.social-link svg {
  width: 1.8rem;
  height: 1.8rem;
  fill: currentColor;
}

.made-in-bern {
  flex: 0 0 auto;
  margin: 0;
  color: var(--color-green-pale);
  font-size: var(--step--1);
  font-weight: 700;
  white-space: nowrap;
}

@media (min-width: 55rem) {
  .desktop-navigation {
    display: block;
  }

  .desktop-navigation ul {
    display: flex;
    align-items: center;
    gap: 0.1rem;
  }

  .site-navigation {
    display: none;
  }
}

@media (max-width: 54.99rem) {
  .download-actions {
    grid-template-columns: 1fr;
    max-width: 31rem;
  }

  .download-button {
    justify-content: flex-start;
    text-align: left;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 38rem) {
  :root {
    --header-height: 4.5rem;
  }

  .header-inner,
  .hero-inner,
  .footer-inner {
    width: min(100% - 2 * var(--space-3), var(--content-width));
  }

  .site-navigation nav {
    right: var(--space-3);
    left: var(--space-3);
  }

  .hero {
    min-height: calc(100svh - var(--header-height));
    background-image:
      linear-gradient(rgb(8 34 51 / 68%), rgb(8 34 51 / 84%)),
      url("img/hero-stilles-coaching.jpg");
    background-position: 43% center;
  }

  .hero-inner {
    padding-block: var(--space-6);
  }

  .hero-content {
    margin-left: 0;
    padding: var(--space-4);
    background: rgb(8 34 51 / 58%);
    backdrop-filter: none;
  }

  .hero h1 {
    max-width: none;
  }

  .download-actions {
    margin-top: var(--space-5);
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@media print {
  .desktop-navigation,
  .site-navigation,
  .download-actions,
  .site-footer {
    display: none;
  }

  .hero {
    min-height: 0;
    color: var(--color-ink);
    background: var(--color-paper);
  }

  .hero-content {
    padding: 0;
    border: 0;
    box-shadow: none;
  }
}
