/* stmfinadvice.ch, Entwurf A "Studio" und Impressum
   Farben aus dem Studiohintergrund der Porträts und dem Urnersee abgeleitet, siehe _konzept.md. */

/* ------------------------------------------------------------------ Schriften */

@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Hanken Grotesk";
  src: url("fonts/hanken-grotesk-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Ersatzschriften mit angeglichenen Metriken, damit beim Nachladen nichts springt.
   Werte berechnet aus den TTF-Dateien in _tools/ (Breite eines deutschen Mustertexts). */
@font-face {
  font-family: "Newsreader Fallback";
  src: local("Georgia");
  size-adjust: 96.1%;
  ascent-override: 76.5%;
  descent-override: 27.6%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Hanken Grotesk Fallback";
  src: local("Arial"), local("Helvetica");
  size-adjust: 99.8%;
  ascent-override: 100.2%;
  descent-override: 30.3%;
  line-gap-override: 0%;
}

/* ------------------------------------------------------------------ Tokens */

:root {
  --studio: #1d2029;
  --studio-deep: #16181f;
  --ink: #16212e;
  --lake: #1d5b86;
  --lake-deep: #154566;
  --shirt: #b9cfe9;
  --paper: #f4f6f8;
  --paper-tint: #e8eef4;
  --slate: #536071;
  --rule: #d2d9e1;
  --on-dark: #eef2f7;
  --on-dark-muted: #b4bdca;
  --on-dark-rule: rgba(238, 242, 247, 0.16);

  --serif: "Newsreader", "Newsreader Fallback", Georgia, serif;
  --sans: "Hanken Grotesk", "Hanken Grotesk Fallback", Arial, sans-serif;

  /* Massstab bewusst ruhig: Die Seite soll informieren, nicht auftrumpfen. */
  --step--1: 0.9375rem;
  --step-0: 1.0625rem;
  --step-1: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);
  --step-2: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  --step-3: clamp(1.7rem, 1.35rem + 1.2vw, 2.4rem);
  --step-4: clamp(2.2rem, 1.6rem + 2vw, 3.25rem);

  --gutter: clamp(1.25rem, 0.5rem + 3vw, 3rem);
  --section: clamp(3.5rem, 2.5rem + 4vw, 6.5rem);
  --measure: 36rem;
  --header-h: 4.25rem;
}

/* ------------------------------------------------------------------ Basis */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Ankersprünge gleiten, ausser wenn weniger Bewegung gewünscht ist. */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure,
address {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--lake);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--lake-deep);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--lake);
  outline-offset: 3px;
  border-radius: 2px;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h2 {
  font-size: var(--step-3);
}

h3 {
  font-size: var(--step-1);
  line-height: 1.3;
}

p {
  text-wrap: pretty;
}

address {
  font-style: normal;
}

.wrap {
  width: 100%;
  max-width: 76rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 20;
  padding: 0.6rem 1rem;
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

.section {
  padding-block: var(--section);
}

.section__head {
  max-width: 40rem;
}

.intro {
  margin-top: 0.9rem;
  color: var(--slate);
  max-width: 30rem;
}

.split {
  display: grid;
  gap: 2rem;
}

@media (min-width: 56em) {
  .split {
    grid-template-columns: 4fr 7fr;
    gap: 4rem;
  }
}

/* ------------------------------------------------------------------ Kopf */

/* Kompakt und auf dem Desktop immer sichtbar, damit man von überall zum Kontakt kommt.
   Mobil scrollt er mit, weil er dort zweizeilig ist und sonst zu viel Platz belegt. */
.site-header {
  position: relative;
  z-index: 10;
  background: var(--studio);
  color: var(--on-dark);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 2rem;
  padding-block: 0.9rem;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0.005em;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.wordmark b {
  font-weight: 620;
  letter-spacing: 0.04em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 1.4rem;
  font-size: var(--step--1);
  font-weight: 500;
}

.site-header a {
  color: inherit;
  text-decoration: none;
}

.nav a:hover {
  color: var(--shirt);
}

.nav .nav__cta {
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(185, 207, 233, 0.55);
  border-radius: 3px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav .nav__cta:hover {
  background: var(--shirt);
  color: var(--studio);
}

.site-header :focus-visible {
  outline-color: var(--shirt);
}

/* Schmale Bildschirme: nur Logo und Kontakt in einer Zeile. Die Abschnitte folgen
   ohnehin direkt untereinander, eine mehrzeilige Navigation würde den Hero verdrängen. */
@media (max-width: 39.99em) {
  .site-header__inner {
    flex-wrap: nowrap;
  }

  .nav li:not(:last-child) {
    display: none;
  }
}

@media (min-width: 48em) {
  html {
    scroll-padding-top: calc(var(--header-h) + 0.5rem);
  }

  .site-header {
    position: sticky;
    top: 0;
  }

  .site-header__inner {
    min-height: var(--header-h);
    padding-block: 0;
  }
}

/* ------------------------------------------------------------------ Hero */

/* Der Hintergrund setzt den Studiohintergrund des Fotos fort: links dunkel,
   nach rechts übernimmt das Foto selbst. Die Höhe ergibt sich aus dem Inhalt,
   damit auf dem Desktop der nächste Abschnitt schon im ersten Bild anschneidet. */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #1d1f28 0%, #292c37 55%, #1f212b 100%);
  color: var(--on-dark);
}

.hero__photo img {
  width: 100%;
  animation: studiolicht 1.6s cubic-bezier(0.2, 0.6, 0.2, 1) both;
}

/* Das Studiolicht geht an. Bewusst Helligkeit statt Deckkraft, damit das Bild sofort
   gemalt wird und der LCP nicht wartet. */
@keyframes studiolicht {
  from {
    filter: brightness(0.55) saturate(0.85);
  }
  to {
    filter: none;
  }
}

.hero__inner {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: var(--step-4);
  font-weight: 380;
  line-height: 1.08;
  letter-spacing: -0.015em;
  max-width: 17ch;
}

.hero__lead {
  margin-top: 1.25rem;
  max-width: 33rem;
  color: var(--on-dark-muted);
  font-size: var(--step-1);
  line-height: 1.55;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.6rem;
  margin-top: 1.75rem;
}

.button {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border-radius: 3px;
  background: var(--shirt);
  color: var(--studio);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.3;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.button:hover {
  background: #d3e2f3;
  color: var(--studio);
  text-decoration: none;
}

.hero :focus-visible,
.contact :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--shirt);
}

.link-quiet {
  color: var(--on-dark);
  font-weight: 500;
  font-size: 1rem;
}

.link-quiet:hover {
  color: var(--shirt);
}

/* Mobil und Tablet: Bild oben, oben und unten ins Studio ausgeblendet, Text darunter. */
@media (max-width: 55.99em) {
  .hero__photo img {
    max-height: 54svh;
    object-fit: cover;
    object-position: 50% 22%;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 60%, transparent 98%);
    mask-image: linear-gradient(180deg, #000 0%, #000 60%, transparent 98%);
  }

  .hero__inner {
    margin-top: -3.5rem;
    padding-bottom: 3rem;
  }
}

/* Desktop: Bild rechts unten, nicht ganz so hoch wie der Hero, damit das Gesicht nicht
   erschlägt. Es blendet nach links und nach oben weich ins Studio aus; der helle
   Rand oben wirkt wie das Studiolicht hinter dem Kopf. */
@media (min-width: 56em) {
  .hero__photo {
    position: absolute;
    inset: auto 0 0 auto;
    width: 46%;
    height: 84%;
  }

  .hero__photo img {
    height: 100%;
    object-fit: cover;
    object-position: 50% 15%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 42%), linear-gradient(180deg, transparent 0%, #000 9%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(90deg, transparent 0%, #000 42%), linear-gradient(180deg, transparent 0%, #000 9%);
    mask-composite: intersect;
  }

  .hero__inner {
    padding-block: clamp(4rem, 2rem + 6vh, 6.5rem);
  }

  .hero__text {
    max-width: 36rem;
  }
}

/* ------------------------------------------------------------------ Qualifikationen */

/* Belege gehören nach oben, aber leiser als die Botschaft: schmales Band direkt unter dem Hero. */
.credentials-bar {
  border-bottom: 1px solid var(--rule);
}

.credentials {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1.5rem;
  padding-block: 1.1rem;
  font-size: var(--step--1);
  line-height: 1.4;
}

.credentials strong {
  display: block;
  font-weight: 600;
}

.credentials span {
  color: var(--slate);
}

@media (min-width: 56em) {
  .credentials {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .credentials li + li {
    padding-left: 1.5rem;
    border-left: 1px solid var(--rule);
  }
}

/* ------------------------------------------------------------------ Wann Sie mich beiziehen */

.situations h2 {
  max-width: 40rem;
}

.situations__list {
  display: grid;
  gap: 1.75rem 3rem;
  margin-top: 2.25rem;
}

.situations__list li {
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
}

.situations__list p {
  margin-top: 0.45rem;
  color: var(--slate);
  font-size: var(--step--1);
  max-width: 32rem;
}

@media (min-width: 40em) {
  .situations__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64em) {
  .situations__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ------------------------------------------------------------------ Leistungen */

.offer {
  background: var(--paper-tint);
}

.offer__grid {
  display: grid;
  gap: 2.75rem 3rem;
  margin-top: 2.5rem;
}

.offer__item {
  padding-top: 1.25rem;
  border-top: 1px solid var(--ink);
}

.offer__item h3 {
  font-size: var(--step-2);
}

.offer__item > p {
  margin-top: 0.75rem;
  max-width: var(--measure);
}

.tasks {
  display: grid;
  gap: 0.3rem;
  margin-top: 1rem;
  font-size: var(--step--1);
  color: var(--slate);
}

.tasks li {
  position: relative;
  padding-left: 1.1rem;
}

.tasks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 0.45rem;
  height: 1px;
  background: currentColor;
}

.offer__item > .offer__ref {
  margin-top: 1.1rem;
  font-size: var(--step--1);
  color: var(--slate);
}

.offer__ref strong {
  color: var(--ink);
  font-weight: 600;
}

@media (min-width: 60em) {
  .offer__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ------------------------------------------------------------------ Ergebnisse */

/* Wie ein Ausweis im Geschäftsbericht: Kennzahl links, Erläuterung rechts. */
.ledger {
  border-top: 1px solid var(--ink);
}

.ledger > div {
  display: grid;
  gap: 0.2rem 2rem;
  padding-block: 0.95rem;
  border-bottom: 1px solid var(--rule);
}

.ledger dt {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: var(--step-2);
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  color: var(--lake-deep);
  white-space: nowrap;
}

.ledger dd {
  align-self: center;
  max-width: var(--measure);
}

.ledger strong {
  font-weight: 600;
}

@media (min-width: 40em) {
  .ledger > div {
    grid-template-columns: 11rem 1fr;
    align-items: baseline;
  }
}

/* ------------------------------------------------------------------ Landschaft */

.landscape img {
  width: 100%;
  height: clamp(11rem, 24vw, 21rem);
  object-fit: cover;
  object-position: 50% 78%;
}

.landscape figcaption {
  padding-block: 0.6rem;
  font-size: 0.8125rem;
  color: var(--slate);
}

/* ------------------------------------------------------------------ Über mich */

.about__grid {
  display: grid;
  gap: 2.5rem;
}

.about__photo img {
  width: 100%;
  max-width: 22rem;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.about__text h2 {
  margin-bottom: 1.25rem;
}

/* Persönlicher Abschnitt in der Textschrift, damit er anders klingt als der Rest. */
.about__text > p {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: var(--step-1);
  line-height: 1.6;
  max-width: 38rem;
}

.about__text > p + p {
  margin-top: 0.9em;
}

.about__facts {
  display: grid;
  gap: 1.75rem 3rem;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
}

.about__facts h3 {
  margin-bottom: 0.7rem;
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0;
}

.stations {
  font-size: var(--step--1);
  line-height: 1.5;
}

.stations li {
  display: grid;
  grid-template-columns: 7.25rem 1fr;
  gap: 1rem;
}

.stations li + li {
  margin-top: 0.55rem;
}

.stations strong {
  font-weight: 600;
}

.year {
  font-variant-numeric: tabular-nums;
  color: var(--lake-deep);
  white-space: nowrap;
}

.languages {
  font-size: var(--step--1);
  color: var(--slate);
}

.languages strong {
  color: var(--ink);
  font-weight: 600;
}

@media (min-width: 56em) {
  .about__grid {
    grid-template-columns: 20rem 1fr;
    gap: 4.5rem;
    align-items: start;
  }

  .about__photo {
    position: sticky;
    top: calc(var(--header-h) + 2rem);
  }

}

/* ------------------------------------------------------------------ Fragen */

.faq {
  border-top: 1px solid var(--rule);
}

.faq details {
  border-bottom: 1px solid var(--rule);
}

.faq details:first-child {
  border-top: 1px solid var(--ink);
}

.faq summary {
  position: relative;
  padding: 1.05rem 2.5rem 1.05rem 0;
  font-family: var(--serif);
  font-size: var(--step-1);
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
}

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

/* Plus wird beim Öffnen zum Minus: der senkrechte Strich dreht sich weg. */
.faq summary::before,
.faq summary::after {
  content: "";
  position: absolute;
  right: 0.4rem;
  top: 50%;
  width: 0.85rem;
  height: 1.5px;
  background: var(--lake);
  transition: transform 0.25s ease;
}

.faq summary::after {
  transform: rotate(90deg);
}

.faq details[open] summary::after {
  transform: rotate(0deg);
}

.faq summary:hover {
  color: var(--lake-deep);
}

.faq details p {
  padding-bottom: 1.3rem;
  max-width: var(--measure);
  color: var(--slate);
}

/* ------------------------------------------------------------------ Kontakt */

.contact {
  padding-block: var(--section);
  background: var(--studio);
  color: var(--on-dark);
}

.contact__grid {
  display: grid;
  gap: 2.5rem;
}

.contact__intro {
  margin-top: 0.9rem;
  max-width: 30rem;
  color: var(--on-dark-muted);
}

/* Drei Schritte in echter Reihenfolge. Die gemeinsame Linie oben zeigt den Ablauf,
   ohne dass es grosse Ziffern braucht. */
.steps {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.25rem;
}

.steps li {
  padding-top: 0.9rem;
  border-top: 1px solid var(--on-dark-rule);
}

.steps h3 {
  font-size: var(--step-1);
  color: var(--on-dark);
}

.steps p {
  margin-top: 0.35rem;
  font-size: var(--step--1);
  color: var(--on-dark-muted);
}

.contact a {
  color: var(--on-dark);
}

.contact a:hover {
  color: var(--shirt);
}

.contact__card {
  align-self: start;
  padding: clamp(1.5rem, 1rem + 1.5vw, 2.25rem);
  border: 1px solid var(--on-dark-rule);
  border-radius: 4px;
  background: rgba(238, 242, 247, 0.03);
}

.contact__list > div + div {
  margin-top: 1rem;
}

.contact__list dt {
  font-size: 0.875rem;
  color: var(--on-dark-muted);
}

.contact__list dd {
  margin-top: 0.1rem;
  font-size: var(--step-1);
  line-height: 1.45;
}

.contact__list dd a {
  text-decoration: none;
  border-bottom: 1px solid var(--on-dark-rule);
}

.contact__list dd a:hover {
  border-bottom-color: var(--shirt);
}

.contact__card .button {
  margin-top: 1.75rem;
}

.contact .button,
.contact .button:hover {
  color: var(--studio);
}

@media (min-width: 40em) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 56em) {
  .contact__grid {
    grid-template-columns: 7fr 5fr;
    gap: 4.5rem;
  }
}

/* ------------------------------------------------------------------ Fuss */

.site-footer {
  background: var(--studio-deep);
  color: var(--on-dark-muted);
  font-size: 0.875rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2.5rem;
  padding-block: 1.6rem;
}

.site-footer a {
  color: var(--on-dark);
}

/* ------------------------------------------------------------------ Unterseite */

.page-head {
  padding-block: clamp(3rem, 2rem + 4vw, 5rem) clamp(2rem, 1.5rem + 2vw, 3rem);
  background: linear-gradient(180deg, #1d1f28 0%, #292c37 100%);
  color: var(--on-dark);
}

.page-head h1 {
  font-size: var(--step-4);
  font-weight: 380;
  line-height: 1.08;
}

.prose {
  max-width: 44rem;
}

.prose h2 {
  font-size: var(--step-2);
  margin-top: 3rem;
}

.prose h3 {
  font-size: var(--step-1);
  margin-top: 2rem;
}

.prose p,
.prose ul,
.prose address {
  margin-top: 1rem;
}

.prose ul {
  padding-left: 1.2rem;
  list-style: disc;
}

.prose > :first-child {
  margin-top: 0;
}

/* ------------------------------------------------------------------ Bewegung */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
