/* SHG Karriere – design tokens, reset and the reduced header. */

:root {
  /* Brand: SHG red and ink as used in the official logo and on shg-kliniken.de */
  --shg-red: #C00A26;
  --shg-red-deep: #A00820;
  --ink: #1D1D1B;
  --ink-muted: #55524E;
  --paper: #F5F0EA;
  /* Secondary brand colour – quiet accents only: 4.85:1 on the light section grounds, 4.4:1 on the footer (icons there, no small text) */
  --shg-secondary: #4E6B7D;
  --font-sans: "Fira Sans", "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --gutter: clamp(1.25rem, 5vw, 5.5rem);
}

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

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

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Form controls take the house font instead of the system font */
button,
input,
select,
textarea {
  font: inherit;
}

/* Fallback focus ring for every control without its own focus style */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link – only visible when reached with the keyboard */
.skip-link {
  position: absolute;
  top: .75rem;
  left: var(--gutter);
  z-index: 200;
  padding: .75rem 1.25rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  transform: translateY(calc(-100% - 1rem));
}

.skip-link:focus {
  transform: none;
}

.skip-link:focus-visible {
  outline: 3px solid var(--shg-red);
  outline-offset: 2px;
}

/* Header – deliberately reduced to the brand mark */
/*
 * Hello Elementor stylt seine eigenen .site-header und .site-footer auf eine
 * Inhaltsbreite von 1140px – mit .site-header:not(.dynamic-header), also
 * Spezifitaet (0,2,0). Unsere Klassen heissen zufaellig genauso und liegen bei
 * (0,1,0). Doppelt geklassifiziert gewinnen sie und bleiben ueber die volle
 * Breite, so wie die Gestaltung es vorsieht. Im Prototyp aendert das nichts.
 */
.site-header.site-header,
.site-footer.site-footer {
  max-width: none;
  width: auto;
}

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(1rem, 3.4vh, 2.25rem) var(--gutter);
  pointer-events: none;
}

.site-header__brand {
  display: inline-flex;
  border-radius: .25rem;
  pointer-events: auto;
}

.site-header__brand:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 6px;
}

.site-header__brand img {
  width: auto;
  height: clamp(2.25rem, 3.4vw, 3.25rem);
}

/* Buttons – shared by hero and menu */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  min-height: 3.5rem;
  padding: .875rem 1.75rem;
  border-radius: 999px;
  font: 500 1rem/1.25 var(--font-sans);
  letter-spacing: .005em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color .35s var(--ease-out),
    color .35s var(--ease-out),
    box-shadow .6s var(--ease-out),
    transform .35s var(--ease-out);
}

.btn:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}

.btn:active {
  transform: scale(.98);
}

.btn__icon {
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  transition: transform .45s var(--ease-out);
}

/*
 * Die Knopfvarianten stehen doppelt geklassifiziert da: .btn.btn--primary
 * statt .btn--primary. Grund ist Elementor, das auf jeder Seite
 * ".elementor a { box-shadow: none; text-decoration: none }" setzt –
 * Spezifitaet (0,1,1). Eine einzelne Klasse liegt bei (0,1,0) und verliert,
 * der Innenring und der Schein beim Ueberfahren waeren weg. Zwei Klassen
 * ergeben (0,2,0) und gewinnen. Im Prototyp aendert das nichts.
 */

.btn.btn--primary {
  background: var(--shg-red);
  color: #fff;
  box-shadow: 0 0 0 0 rgba(192, 10, 38, .14), 0 0 0 0 rgba(192, 10, 38, .06);
}

.btn.btn--ghost {
  background: rgba(245, 240, 234, .6);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(29, 29, 27, .3);
}

@media (hover: hover) {
  .btn.btn--primary:hover {
    background: var(--shg-red-deep);
    box-shadow: 0 0 0 .5rem rgba(192, 10, 38, .12), 0 0 0 1.125rem rgba(192, 10, 38, .05);
  }

  .btn.btn--primary:hover .btn__icon {
    transform: translateX(.25rem);
  }

  .btn.btn--ghost:hover {
    background: rgba(29, 29, 27, .05);
    box-shadow: inset 0 0 0 1px var(--ink);
  }
}

/* Intro reveal (only while JS runs the intro, see inline script in index.html) */
.hero-intro [data-reveal] {
  opacity: 0;
  translate: 0 .875rem;
  transition:
    opacity calc(1s / var(--hero-speed, 1)) var(--ease-out) calc(var(--d, 0ms) / var(--hero-speed, 1)),
    translate calc(1.3s / var(--hero-speed, 1)) var(--ease-out) calc(var(--d, 0ms) / var(--hero-speed, 1));
}

.hero-intro [data-reveal].is-in {
  opacity: 1;
  translate: none;
}
