/* UPGRAIT — quiet, precise, intentionally understated. */

:root,
:root[data-theme="light"] {
  --upg-blue: #2d88c9;
  --upg-canvas: #fbfbfa;
  --upg-surface: #ffffff;
  --upg-text: #171717;
  --upg-muted: #6d6d6a;
  --upg-line: rgba(20, 20, 20, 0.10);
  --upg-glass: rgba(251, 251, 250, 0.76);
  --upg-glass-border: rgba(20, 20, 20, 0.08);
  --upg-video-bg: #ececea;

  --q2-bg: var(--upg-canvas);
  --q2-bg-elev: var(--upg-surface);
  --q2-bg-muted: #f3f3f1;
  --q2-text: var(--upg-text);
  --q2-text-strong: #101010;
  --q2-text-muted: var(--upg-muted);
  --q2-divider: var(--upg-line);
  --q2-nav-bg: var(--upg-glass);
  --q2-nav-border: var(--upg-glass-border);
  --q2-accent: var(--upg-blue);
  --q2-link: var(--upg-blue);
  --q2-header-height: 78px;
}

:root[data-theme="dark"] {
  --upg-canvas: #101112;
  --upg-surface: #161719;
  --upg-text: #f2f2ef;
  --upg-muted: #a3a3a0;
  --upg-line: rgba(255, 255, 255, 0.11);
  --upg-glass: rgba(16, 17, 18, 0.74);
  --upg-glass-border: rgba(255, 255, 255, 0.08);
  --upg-video-bg: #18191b;

  --q2-bg: var(--upg-canvas);
  --q2-bg-elev: var(--upg-surface);
  --q2-bg-muted: #1d1e20;
  --q2-text: var(--upg-text);
  --q2-text-strong: #ffffff;
  --q2-text-muted: var(--upg-muted);
  --q2-divider: var(--upg-line);
  --q2-nav-bg: var(--upg-glass);
  --q2-nav-border: var(--upg-glass-border);
  --q2-accent: #57a7df;
  --q2-link: #70b5e5;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  background: var(--upg-canvas);
}

/* Quark 2 already supplies the scroll state; UPGRAIT keeps the top state quiet. */
#header {
  background: var(--upg-canvas);
  border-bottom-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

body.scrolled #header {
  background: var(--upg-glass);
  border-bottom-color: var(--upg-glass-border);
  backdrop-filter: blur(20px) saturate(145%);
  -webkit-backdrop-filter: blur(20px) saturate(145%);
  box-shadow: 0 10px 30px -26px rgba(0, 0, 0, 0.65);
}

#header .container,
#footer .container,
.upgrait-home .container {
  width: min(1180px, calc(100% - 48px));
  max-width: none;
}

#header .navbar {
  gap: 2rem;
}

.navbar-section.logo {
  min-width: 190px;
}

.upgrait-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

/* Corporate identity: only the supplied UPGRAIT PNG wordmarks are used. */
.upgrait-brand-logo {
  display: block;
  width: auto;
  height: 30px;
  max-width: 190px;
  object-fit: contain;
}

.upgrait-brand-logo--dark {
  display: none;
}

:root[data-theme="dark"] .upgrait-brand-logo--light {
  display: none;
}

:root[data-theme="dark"] .upgrait-brand-logo--dark {
  display: block;
}

.dropmenu .upgrait-navigation {
  gap: 0.15rem;
}

.dropmenu .upgrait-navigation a {
  padding: 0.52rem 0.72rem;
  border-radius: 5px;
  color: var(--q2-text-strong);
  font-size: 0.91rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.dropmenu .upgrait-navigation a:hover {
  background: transparent;
  color: var(--upg-blue);
}

.dropmenu .upgrait-navigation a.active,
.dropmenu .upgrait-navigation a.active:hover {
  background: transparent;
  color: var(--upg-blue);
  font-weight: 600;
}

/* Remove Quark's decorative heading bar. Type and spacing do the work here. */
h2::before {
  display: none !important;
}

h1, h2, h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

.upg-kicker {
  margin: 0 0 1rem;
  color: var(--q2-text-muted);
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.13em;
  line-height: 1;
  text-transform: uppercase;
}

.upgrait-home {
  overflow: clip;
}

.upg-hero {
  padding: clamp(5rem, 10vw, 8.5rem) 0 clamp(4rem, 8vw, 7rem);
}

.upg-hero-copy {
  max-width: 900px !important;
  margin-inline: auto;
  text-align: center;
}

.upg-hero h1 {
  max-width: 13ch;
  margin: 0 auto;
  color: var(--q2-text-strong);
  font-size: clamp(3.35rem, 8vw, 7.4rem);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 0.96;
}

.upg-hero-lead {
  max-width: 710px;
  margin: 1.7rem auto 0;
  color: var(--q2-text-muted);
  font-size: clamp(1.08rem, 1.6vw, 1.3rem);
  line-height: 1.65;
}

.upg-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 1.5rem;
  margin-top: 2rem;
}

.upg-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.72rem 1.15rem;
  border: 1px solid var(--q2-text-strong);
  border-radius: 6px;
  background: var(--q2-text-strong);
  color: var(--q2-text-inverse) !important;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none !important;
  transition: opacity 150ms ease, transform 150ms ease;
}

.upg-button:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.upg-text-link {
  color: var(--q2-text-strong);
  font-size: 0.94rem;
  font-weight: 550;
  text-decoration: none;
}

.upg-text-link span {
  display: inline-block;
  margin-left: 0.35rem;
  transition: transform 150ms ease;
}

.upg-text-link:hover span {
  transform: translateX(3px);
}

.upg-hero-media-wrap {
  margin-top: clamp(3.5rem, 7vw, 6rem);
}

.upg-hero-media {
  overflow: hidden;
  aspect-ratio: 16 / 8.7;
  border: 1px solid var(--upg-line);
  border-radius: 14px;
  background: var(--upg-video-bg);
}

.upg-hero-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upg-section {
  padding: clamp(5rem, 9vw, 8rem) 0;
  border-top: 1px solid var(--upg-line);
}

.upg-section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 2rem 5rem;
  align-items: start;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.upg-section-heading .upg-kicker {
  grid-column: 1;
}

.upg-section-heading h2,
.upg-section-heading > p:last-child {
  grid-column: 2;
}

.upg-section-heading h2 {
  grid-row: 1;
  margin: 0;
  color: var(--q2-text-strong);
  font-size: clamp(2.35rem, 5vw, 4.3rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
}

.upg-section-heading > p:last-child {
  max-width: 620px;
  margin: -1rem 0 0;
  color: var(--q2-text-muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.upg-service-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--upg-line);
  list-style: none;
}

.upg-service-list li {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 1.25rem 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--upg-line);
}

.upg-service-index {
  padding-top: 0.25rem;
  color: var(--q2-text-muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.upg-service-list h3 {
  margin: 0;
  color: var(--q2-text-strong);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.025em;
}

.upg-service-list p {
  max-width: 760px;
  margin: 0.55rem 0 0;
  color: var(--q2-text-muted);
}

.upg-statement-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: 3rem 6rem;
}

.upg-statement h2 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 4.2rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.04;
}

.upg-large-copy {
  max-width: 760px;
  margin: 2rem 0;
  color: var(--q2-text-muted);
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  line-height: 1.65;
}

.upg-quote-list {
  border-top: 1px solid var(--upg-line);
}

.upg-quote-list blockquote {
  margin: 0;
  padding: 2.25rem 0;
  border: 0;
  border-bottom: 1px solid var(--upg-line);
}

.upg-quote-list blockquote p {
  max-width: 980px;
  margin: 0;
  font-family: var(--pico-font-family-display);
  font-size: clamp(1.4rem, 2.7vw, 2.3rem);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.025em;
}

.upg-contact-band-inner {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
}

.upg-contact-band h2 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.3rem);
  font-weight: 400;
  letter-spacing: -0.04em;
}

/* Standard/imported pages */
#body-wrapper > .container {
  width: min(900px, calc(100% - 48px));
  max-width: none;
}

.content-item {
  padding-block: clamp(3.5rem, 7vw, 6rem);
}

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

.content-item h1 {
  margin-bottom: 2rem;
  font-weight: 400;
  letter-spacing: -0.035em;
}

.content-item h2 {
  margin-top: 3rem;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.content-item p,
.content-item li {
  line-height: 1.78;
}

/* Old WP icon references are intentionally not part of the new design. */
.content-item img[src*="/wp-content/uploads/"] {
  display: none;
}

/* Footer */
.upgrait-footer {
  padding: 2.25rem 0;
  border-top: 1px solid var(--upg-line);
  background: var(--upg-canvas);
}

.upgrait-footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.75rem 3rem;
  align-items: center;
}

.upgrait-footer-brand {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
}

.upgrait-footer-brand strong {
  color: var(--q2-text-strong);
  font-family: var(--pico-font-family-display);
  letter-spacing: 0.05em;
}

.upgrait-footer-brand span,
.upgrait-footer-copy {
  color: var(--q2-text-muted);
  font-size: 0.82rem;
}

.upgrait-footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem 1.25rem;
}

.upgrait-footer-nav a {
  color: var(--q2-text-muted);
  font-size: 0.82rem;
  text-decoration: none;
}

.upgrait-footer-nav a:hover {
  color: var(--q2-text-strong);
}

.upgrait-footer-copy {
  grid-column: 1 / -1;
}

@media (max-width: 920px) {
  #header .container,
  #footer .container,
  .upgrait-home .container,
  #body-wrapper > .container {
    width: min(100% - 32px, 1180px);
  }

  .navbar-section.logo {
    min-width: 0;
  }

  .upg-section-heading,
  .upg-statement-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .upg-section-heading .upg-kicker,
  .upg-section-heading h2,
  .upg-section-heading > p:last-child {
    grid-column: 1;
    grid-row: auto;
  }

  .upg-section-heading > p:last-child {
    margin-top: 0;
  }
}

@media (max-width: 640px) {
  .upgrait-wordmark { font-size: 1rem; }

  .upg-hero {
    padding-top: 4.25rem;
  }

  .upg-hero h1 {
    font-size: clamp(2.85rem, 15vw, 4.8rem);
  }

  .upg-hero-media-wrap {
    width: 100% !important;
  }

  .upg-hero-media {
    aspect-ratio: 4 / 3;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .upg-service-list li {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .upg-contact-band-inner,
  .upgrait-footer-inner,
  .upgrait-footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .upgrait-footer-nav {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .upg-button,
  .upg-text-link span { transition: none; }
  .upg-hero-media video { animation: none; }
}

/* Footer uses the same supplied corporate wordmark, never a recreated text logo. */
.upgrait-footer-logo .upgrait-brand-logo {
  height: 24px;
  max-width: 150px;
}

/* v0.4 CI hardening: exactly one supplied corporate logo is visible. */
.upgrait-brand-logo--light { display: block !important; }
.upgrait-brand-logo--dark { display: none !important; }
html[data-theme="dark"] .upgrait-brand-logo--light { display: none !important; }
html[data-theme="dark"] .upgrait-brand-logo--dark { display: block !important; }
#header .upgrait-brand-logo { height: 30px !important; width: auto !important; max-width: 190px !important; }
#footer .upgrait-brand-logo { height: 24px !important; width: auto !important; max-width: 150px !important; }

/* ----------------------------------------------------
   v0.5 — appearance switcher + refined error page
---------------------------------------------------- */

/* A slightly lighter, quieter dark canvas than v0.4. */
:root[data-theme="dark"] {
  --upg-canvas: #17191b;
  --upg-surface: #202225;
  --upg-video-bg: #202225;
  --upg-glass: rgba(23, 25, 27, 0.76);
  --q2-bg: var(--upg-canvas);
  --q2-bg-elev: var(--upg-surface);
  --q2-bg-muted: #24272a;
}

/* Text-only, explicit three-state control. No icon font dependency. */
.upg-theme-switcher {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  color: var(--q2-text-muted);
  font-size: 0.78rem;
  line-height: 1;
}

.upg-theme-switcher__option {
  appearance: none;
  width: auto;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0.38rem 0.42rem;
  border: 0;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
  color: var(--q2-text-muted);
  font: inherit;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: color 140ms ease, background-color 140ms ease;
}

.upg-theme-switcher__option:hover {
  background: transparent;
  color: var(--q2-text-strong);
}

.upg-theme-switcher__option.is-active {
  background: color-mix(in srgb, var(--q2-text-strong) 7%, transparent);
  color: var(--q2-text-strong);
  font-weight: 650;
}

.upg-theme-switcher__option:focus-visible {
  outline: 2px solid var(--q2-accent);
  outline-offset: 2px;
}

.upg-theme-switcher__separator {
  color: var(--upg-line);
  padding: 0 0.05rem;
  user-select: none;
}

#header .navbar-section.actions {
  flex: 0 0 auto;
}

/* Error page: calm dark grey canvas, balanced card, correctly padded CTA. */
.upgrait-error-page #body-wrapper {
  padding-top: clamp(2.5rem, 5vw, 4.5rem);
  padding-bottom: clamp(4rem, 7vw, 6rem);
}

.upgrait-error-page #body-wrapper > .container {
  width: min(900px, calc(100% - 48px));
}

.upg-error {
  min-height: min(620px, 64vh);
  display: grid;
  place-items: center;
}

.upg-error-card {
  width: 100%;
  padding: clamp(4.5rem, 10vw, 8rem) clamp(2rem, 7vw, 5rem);
  border: 1px solid var(--upg-line);
  border-radius: 16px;
  background: var(--upg-surface);
  box-shadow: 0 20px 55px -48px rgba(0, 0, 0, 0.72);
  text-align: center;
}

.upg-error-card h1 {
  margin: 0;
  color: var(--q2-text-strong);
  font-size: clamp(3.5rem, 8vw, 6rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.upg-error-message {
  margin: 1.7rem auto 0;
  color: var(--q2-text-muted);
  font-size: 1.02rem;
}

.upg-error-message p {
  margin: 0;
}

.upg-error-action {
  margin: 1.6rem 0 0;
}

.upg-error-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  padding: 0.78rem 1.18rem;
  border: 1px solid var(--q2-accent);
  border-radius: 6px;
  background: var(--q2-accent);
  color: #fff !important;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none !important;
  box-shadow: none;
  transition: filter 140ms ease, transform 140ms ease;
}

.upg-error-home:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

@media (max-width: 920px) {
  #header .upg-theme-switcher {
    display: none;
  }

  .overlay-menu + div .upg-theme-switcher,
  .mobile-container .upg-theme-switcher {
    display: inline-flex;
  }
}

@media (max-width: 640px) {
  .upgrait-error-page #body-wrapper > .container {
    width: min(100% - 28px, 900px);
  }

  .upg-error-card {
    padding: 4rem 1.5rem;
    border-radius: 12px;
  }
}

/* === UPGRAIT THEME SWITCHER V0.9 BEGIN === */
/* ==========================================================
   UPGRAIT appearance slider v0.9
   Quiet three-position segmented slider: Sun / Auto / Moon
   ========================================================== */

.upg-theme-switcher {
  --upg-switch-sun: 34px;
  --upg-switch-auto: 44px;
  --upg-switch-moon: 34px;
  --upg-switch-pad: 3px;
  --upg-switch-height: 32px;

  position: relative;
  isolation: isolate;

  display: inline-grid;
  grid-template-columns:
    var(--upg-switch-sun)
    var(--upg-switch-auto)
    var(--upg-switch-moon);
  align-items: center;

  width: calc(
    var(--upg-switch-sun) +
    var(--upg-switch-auto) +
    var(--upg-switch-moon) +
    (var(--upg-switch-pad) * 2)
  );
  height: calc(var(--upg-switch-height) + (var(--upg-switch-pad) * 2));
  padding: var(--upg-switch-pad);
  margin: 0;

  border: 1px solid rgba(20, 24, 28, 0.11);
  border-radius: 999px;
  background: rgba(20, 24, 28, 0.035);
  box-shadow: none;

  color: var(--q2-text-muted);
  line-height: 1;
  white-space: nowrap;
}

/* One continuous rounded thumb. Its width changes for the wider Auto cell. */
.upg-theme-switcher__indicator {
  position: absolute;
  z-index: 0;
  top: var(--upg-switch-pad);
  left: var(--upg-thumb-left, 37px);

  width: var(--upg-thumb-width, var(--upg-switch-auto));
  height: var(--upg-switch-height);

  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow:
    0 1px 2px rgba(10, 15, 20, 0.08),
    0 1px 5px rgba(10, 15, 20, 0.05);

  transition:
    left 180ms cubic-bezier(.22, .72, .24, 1),
    width 180ms cubic-bezier(.22, .72, .24, 1),
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.upg-theme-switcher[data-mode="light"] {
  --upg-thumb-left: var(--upg-switch-pad);
  --upg-thumb-width: var(--upg-switch-sun);
}

.upg-theme-switcher[data-mode="auto"] {
  --upg-thumb-left: calc(var(--upg-switch-pad) + var(--upg-switch-sun));
  --upg-thumb-width: var(--upg-switch-auto);
}

.upg-theme-switcher[data-mode="dark"] {
  --upg-thumb-left: calc(
    var(--upg-switch-pad) +
    var(--upg-switch-sun) +
    var(--upg-switch-auto)
  );
  --upg-thumb-width: var(--upg-switch-moon);
}

/* Reset Quark/global button styling completely inside this control. */
button.upg-theme-switcher__option,
button.upg-theme-switcher__option:hover,
button.upg-theme-switcher__option:active,
button.upg-theme-switcher__option:focus {
  -webkit-appearance: none;
  appearance: none;

  position: relative;
  z-index: 1;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: var(--upg-switch-height);
  min-width: 0;
  min-height: 0;

  margin: 0;
  padding: 0;

  border: 0 !important;
  border-radius: 999px !important;
  outline: 0;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;

  color: var(--q2-text-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;

  cursor: pointer;
  transform: none;
  transition: color 140ms ease, opacity 140ms ease;
}

button.upg-theme-switcher__option:hover {
  color: var(--q2-text-strong);
}

button.upg-theme-switcher__option.is-active {
  color: var(--q2-text-strong);
  font-weight: 600;
}

button.upg-theme-switcher__option:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--q2-accent) 65%, transparent);
  outline-offset: 2px;
}

.upg-theme-switcher__icon {
  display: block;
  width: 15px;
  height: 15px;
  flex: 0 0 15px;

  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.upg-theme-switcher__auto {
  display: block;
  transform: translateY(-0.25px);
}

.upg-theme-switcher .visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.upg-theme-switcher__separator {
  display: none !important;
}

/* Dark appearance */
:root[data-theme="dark"] .upg-theme-switcher {
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.035);
}

:root[data-theme="dark"] .upg-theme-switcher__indicator {
  background: rgba(255, 255, 255, 0.10);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.045),
    0 1px 4px rgba(0, 0, 0, 0.20);
}

/* Mobile stays available in overlay/menu, hidden in the desktop header. */
@media (max-width: 920px) {
  #header .upg-theme-switcher {
    display: none;
  }

  .overlay-menu .upg-theme-switcher,
  .mobile-container .upg-theme-switcher {
    display: inline-grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  .upg-theme-switcher__indicator {
    transition: none;
  }
}
/* === UPGRAIT THEME SWITCHER V0.9 END === */

/* Force true pill shape for theme switcher */
.upg-theme-switcher {
    border-radius: 9999px !important;
    overflow: hidden;
}

.upg-theme-switcher__indicator {
    border-radius: 9999px !important;
}

.upg-theme-switcher__option {
    border-radius: 9999px !important;
}

/* Theme switcher – exact vertical centering */
.upg-theme-switcher {
    align-items: center !important;
    vertical-align: middle;
}

.upg-theme-switcher__indicator {
    top: 50% !important;
    transform: translateY(-50%) !important;
}

.upg-theme-switcher__option {
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
}

.upg-theme-switcher__icon {
    display: block;
}

/* Theme switcher – optical icon centering */
.upg-theme-switcher__option:not(.upg-theme-switcher__option--auto) {
    position: relative;
}

.upg-theme-switcher__option:not(.upg-theme-switcher__option--auto)
.upg-theme-switcher__icon {
    position: absolute;
    left: 50%;
    top: 50%;
    margin: 0;
    transform: translate(-50%, calc(-50% - 1px));
}

/* === UPGRAIT CONTENT TYPOGRAPHY V0.10 BEGIN === */
/* ==========================================================
   UPGRAIT content typography v0.10
   Calm, readable heading hierarchy for regular pages
   ========================================================== */

.content-item h1,
.content-item h2,
.content-item h3,
.content-item h4 {
  color: var(--q2-text-strong);
  font-family: var(--pico-font-family);
  text-wrap: balance;
}

.content-item h1 {
  margin-top: 0;
  margin-bottom: 1.75rem;

  font-size: clamp(2rem, 3.4vw, 2.35rem);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.025em;
}

.content-item h2 {
  margin-top: 2.75rem;
  margin-bottom: 1rem;

  font-size: clamp(1.5rem, 2.4vw, 1.7rem);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.018em;
}

.content-item h3 {
  margin-top: 2.15rem;
  margin-bottom: 0.8rem;

  font-size: clamp(1.18rem, 1.8vw, 1.32rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.content-item h4 {
  margin-top: 1.75rem;
  margin-bottom: 0.65rem;

  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
}

/* Imported strong markup inside headings must not make them artificially heavy. */
.content-item h1 strong,
.content-item h2 strong,
.content-item h3 strong,
.content-item h4 strong {
  font-weight: inherit;
}
/* === UPGRAIT CONTENT TYPOGRAPHY V0.10 END === */

/* === UPGRAIT MANROPE V0.11 BEGIN === */
/* ==========================================================
   UPGRAIT typography v0.11 — Manrope
   Font file is self-hosted under ../fonts/manrope/
   ========================================================== */

@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope/Manrope-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --upg-font-sans:
    "Manrope",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;

  /* Quark/Pico descendants that use this variable inherit Manrope as well. */
  --pico-font-family: var(--upg-font-sans);
}

/* General site typography */
body,
button,
input,
select,
textarea {
  font-family: var(--upg-font-sans) !important;
}

/* Navigation and UI */
#header,
#header a,
.upg-theme-switcher,
.upg-footer,
.upg-footer a {
  font-family: var(--upg-font-sans) !important;
}

/* Hero */
.upg-hero,
.upg-hero h1,
.upg-hero p,
.upg-hero a,
.upg-kicker {
  font-family: var(--upg-font-sans) !important;
}

/* Normal page content */
.content-item,
.content-item h1,
.content-item h2,
.content-item h3,
.content-item h4,
.content-item h5,
.content-item h6 {
  font-family: var(--upg-font-sans) !important;
}

/* Calm weight system */
body,
.content-item {
  font-weight: 400;
}

#header a,
.upg-footer a,
button,
.upg-theme-switcher {
  font-weight: 500;
}

.content-item h1,
.content-item h2,
.content-item h3,
.content-item h4,
.upg-hero h1 {
  font-weight: 600;
}
/* === UPGRAIT MANROPE V0.11 END === */

/* === UPGRAIT MOBILE V0.12 BEGIN === */
/* ==========================================================
   UPGRAIT mobile refinements v0.12
   - slightly smaller page copy
   - Manrope + calmer weights in fullscreen nav
   - fixed-size 3-position theme pill in mobile overlay
   ========================================================== */

@media (max-width: 640px) {

  /* --------------------------------------------------------
     Regular page content
     -------------------------------------------------------- */

  .content-item {
    font-size: 0.94rem;
    line-height: 1.62;
  }

  .content-item p,
  .content-item li {
    font-size: 0.94rem;
    line-height: 1.62;
  }

  .content-item h1 {
    font-size: 1.85rem;
    line-height: 1.17;
  }

  .content-item h2 {
    font-size: 1.42rem;
    line-height: 1.24;
  }

  .content-item h3 {
    font-size: 1.14rem;
    line-height: 1.30;
  }

  /* --------------------------------------------------------
     Full-screen mobile navigation
     -------------------------------------------------------- */

  .mobile-container .overlay-menu,
  .mobile-container .overlay-menu *,
  .mobile-container .upgrait-navigation,
  .mobile-container .upgrait-navigation * {
    font-family: var(--upg-font-sans, "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif) !important;
  }

  .mobile-container .overlay-menu .upgrait-navigation {
    gap: 0 !important;
  }

  .mobile-container .overlay-menu .upgrait-navigation li {
    margin: 0 0 1.55rem 0 !important;
    padding: 0 !important;
  }

  .mobile-container .overlay-menu .upgrait-navigation a {
    display: inline-block !important;

    margin: 0 !important;
    padding: 0 !important;

    font-family: var(--upg-font-sans, "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif) !important;
    font-size: clamp(1.72rem, 8vw, 2.05rem) !important;
    font-weight: 600 !important;
    line-height: 1.12 !important;
    letter-spacing: -0.025em !important;

    text-decoration: none !important;
  }

  .mobile-container .overlay-menu .upgrait-navigation a.active {
    font-weight: 600 !important;
  }

  /* --------------------------------------------------------
     Theme switcher inside mobile overlay
     Keep the exact dimensions of the desktop control.
     Mobile overlay/button rules must not stretch it.
     -------------------------------------------------------- */

  html body .mobile-container .upg-theme-switcher {
    --upg-switch-sun: 34px;
    --upg-switch-auto: 44px;
    --upg-switch-moon: 34px;
    --upg-switch-pad: 3px;
    --upg-switch-height: 32px;

    display: inline-grid !important;
    grid-template-columns:
      var(--upg-switch-sun)
      var(--upg-switch-auto)
      var(--upg-switch-moon) !important;

    width: 118px !important;
    min-width: 118px !important;
    max-width: 118px !important;

    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;

    padding: var(--upg-switch-pad) !important;
    margin: 0 !important;

    align-items: center !important;
    justify-items: stretch !important;

    border-radius: 9999px !important;
    overflow: hidden !important;

    flex: 0 0 118px !important;
  }

  html body .mobile-container .upg-theme-switcher__option,
  html body .mobile-container button.upg-theme-switcher__option {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;

    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    border-radius: 9999px !important;
    background: transparent !important;
    box-shadow: none !important;

    font-family: var(--upg-font-sans, "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif) !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
  }

  html body .mobile-container .upg-theme-switcher__option.is-active {
    font-weight: 600 !important;
  }

  html body .mobile-container .upg-theme-switcher__indicator {
    top: 50% !important;

    height: 32px !important;
    min-height: 32px !important;

    border-radius: 9999px !important;

    /* Preserve horizontal movement; only centre vertically. */
    transform: translateY(-50%) !important;
  }

  html body .mobile-container .upg-theme-switcher__icon {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;

    width: 15px !important;
    height: 15px !important;

    margin: 0 !important;

    transform: translate(-50%, calc(-50% - 1px)) !important;
  }

  html body .mobile-container .upg-theme-switcher__auto {
    display: block !important;
    margin: 0 !important;
    transform: translateY(-0.25px) !important;
  }
}
/* === UPGRAIT MOBILE V0.12 END === */

/* === UPGRAIT TESTIMONIAL CARDS V0.14 BEGIN === */
/* ==========================================================
   UPGRAIT testimonial cards v0.14
   Home-page Markdown blockquotes -> quiet responsive cards
   ========================================================== */

.upg-testimonials {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;

  margin: 1.6rem 0 0;
}

.upg-testimonials blockquote {
  position: relative;

  display: flex;
  flex-direction: column;
  justify-content: flex-start;

  min-width: 0;
  margin: 0 !important;
  padding: 1.45rem 1.5rem !important;

  border: 1px solid rgba(20, 24, 28, 0.08) !important;
  border-left: 1px solid rgba(20, 24, 28, 0.08) !important;
  border-radius: 12px;

  background: rgba(255, 255, 255, 0.72);
  box-shadow: none !important;

  color: var(--q2-text);
  font-family: var(--upg-font-sans, "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif);
  font-size: 0.98rem;
  font-style: normal !important;
  font-weight: 400;
  line-height: 1.65;
}

.upg-testimonials blockquote p {
  margin: 0 !important;

  color: inherit;
  font: inherit;
}

.upg-testimonials blockquote p + p {
  margin-top: 0.75rem !important;
}

.upg-testimonials blockquote::before,
.upg-testimonials blockquote::after {
  content: none !important;
}

/* Keep links inside testimonials understated. */
.upg-testimonials blockquote a {
  color: var(--q2-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

/* Dark mode */
:root[data-theme="dark"] .upg-testimonials blockquote {
  border-color: rgba(255, 255, 255, 0.075) !important;
  border-left-color: rgba(255, 255, 255, 0.075) !important;

  background: rgba(255, 255, 255, 0.025);
}

/* Slight hover only on devices that really hover. */
@media (hover: hover) and (pointer: fine) {
  .upg-testimonials blockquote {
    transition:
      border-color 160ms ease,
      background-color 160ms ease,
      transform 160ms ease;
  }

  .upg-testimonials blockquote:hover {
    transform: translateY(-1px);
    border-color: rgba(45, 136, 201, 0.24) !important;
  }

  :root[data-theme="dark"] .upg-testimonials blockquote:hover {
    border-color: rgba(88, 169, 224, 0.25) !important;
    background: rgba(255, 255, 255, 0.035);
  }
}

@media (max-width: 720px) {
  .upg-testimonials {
    grid-template-columns: 1fr;
    gap: 0.8rem;
    margin-top: 1.25rem;
  }

  .upg-testimonials blockquote {
    padding: 1.15rem 1.2rem !important;
    font-size: 0.93rem;
    line-height: 1.6;
  }
}
/* === UPGRAIT TESTIMONIAL CARDS V0.14 END === */

/* === UPGRAIT ABUSE NATIVE FORM V0.20 BEGIN === */
.upg-form-page__inner {
  width: min(100%, 820px);
  margin-inline: auto;
}

.upg-form-page__content {
  margin-bottom: 2rem;
}

.upg-abuse-form {
  display: grid;
  gap: 1.25rem;
}

.upg-form-field {
  display: grid;
  gap: .45rem;
}

.upg-form-field > label {
  font-weight: 600;
}

.upg-abuse-form input[type="text"],
.upg-abuse-form input[type="email"],
.upg-abuse-form select,
.upg-abuse-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(20,24,28,.15);
  border-radius: 10px;
  padding: .78rem .9rem;
  background: rgba(255,255,255,.8);
  color: inherit;
  font: inherit;
}

html[data-theme="dark"] .upg-abuse-form input[type="text"],
html[data-theme="dark"] .upg-abuse-form input[type="email"],
html[data-theme="dark"] .upg-abuse-form select,
html[data-theme="dark"] .upg-abuse-form textarea {
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.035);
}

.upg-abuse-form textarea {
  min-height: 8rem;
  resize: vertical;
}

.upg-form-help {
  margin: 0;
  opacity: .68;
  font-size: .86rem;
  line-height: 1.5;
}

.upg-form-check {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: .65rem;
}

.upg-form-check input {
  margin-top: .28rem;
}

.upg-form-check label {
  font-weight: 400;
}

.upg-form-notice {
  margin: 0 0 1.4rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(20,24,28,.10);
  border-radius: 10px;
}

.upg-form-notice--success {
  border-color: rgba(30,130,80,.25);
}

.upg-form-notice--error {
  border-color: rgba(190,65,65,.32);
}

.upg-form-notice ul {
  margin: .65rem 0 0 1.15rem;
}

.upg-form-notice__sub {
  margin-top: .55rem;
}

.upg-hp {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

@media (max-width: 640px) {
  .upg-form-page__content {
    margin-bottom: 1.5rem;
  }

  .upg-abuse-form {
    gap: 1rem;
  }
}
/* === UPGRAIT ABUSE NATIVE FORM V0.20 END === */

/* === UPGRAIT LASTSCHRIFT V0.14 BEGIN === */
/* ==========================================================
   UPGRAIT SEPA / Lastschrift v0.14
   ========================================================== */

.upg-sepa {
  padding: clamp(2.25rem, 5vw, 4.5rem) 0 5rem;
}

.upg-sepa-container {
  max-width: 960px;
}

.upg-sepa-shell {
  padding: clamp(1.4rem, 3vw, 2.35rem);
  border: 1px solid var(--upg-line);
  border-radius: 20px;
  background: var(--upg-surface);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.06);
}

html[data-theme="dark"] .upg-sepa-shell {
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.22);
}

.upg-sepa-intro {
  max-width: 760px;
  margin: 0 0 1rem;
}

.upg-sepa-intro h1 {
  margin: 0 0 0.9rem;
}

.upg-sepa-intro p {
  margin: 0 0 0.8rem;
  color: var(--upg-muted);
}

.upg-sepa-intro p:last-child {
  margin-bottom: 0;
}

.upg-sepa-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 2rem;
  border-top: 1px solid var(--upg-line);
  border-bottom: 1px solid var(--upg-line);
}

.upg-sepa-meta > div {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
  padding: 1.15rem 1.25rem 1.15rem 0;
}

.upg-sepa-meta > div:nth-child(even) {
  padding-left: 1.25rem;
  border-left: 1px solid var(--upg-line);
}

.upg-sepa-meta > div:nth-child(n + 3) {
  border-top: 1px solid var(--upg-line);
}

.upg-sepa-meta-label {
  color: var(--upg-muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.upg-sepa-meta strong {
  color: var(--upg-text);
  font-size: 1rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.upg-sepa-meta span:not(.upg-sepa-meta-label) {
  color: var(--upg-muted);
  line-height: 1.45;
}

.upg-sepa-mandate {
  margin: 0 0 2rem;
  padding: 0.15rem 0 0.15rem 1.15rem;
  border-left: 3px solid var(--upg-blue);
}

.upg-sepa-mandate h2,
.upg-sepa-form-panel > h2 {
  margin-top: 0;
  margin-bottom: 0.85rem;
  font-size: clamp(1.3rem, 2vw, 1.55rem);
  font-weight: 600;
}

.upg-sepa-mandate p {
  margin-bottom: 0.8rem;
  color: var(--upg-muted);
  line-height: 1.65;
}

.upg-sepa-form-panel {
  padding: clamp(1.25rem, 2.5vw, 1.9rem);
  border: 1px solid var(--upg-line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--upg-surface) 70%, var(--upg-canvas) 30%);
}

.upg-sepa-form-panel > h2 {
  margin-bottom: 1.35rem;
}

.upg-sepa-form .form-field {
  margin-bottom: 1.15rem;
}

.upg-sepa-form .form-label,
.upg-sepa-form label {
  color: var(--upg-text);
  font-family: var(--upg-font-sans, "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif);
  font-size: 0.92rem;
  font-weight: 600;
}

.upg-sepa-form input[type="text"],
.upg-sepa-form input[type="email"],
.upg-sepa-form textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 46px;
  margin-top: 0.4rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--upg-line);
  border-radius: 10px;
  outline: none;
  background: var(--upg-canvas);
  color: var(--upg-text);
  font: inherit;
  line-height: 1.45;
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.upg-sepa-form textarea {
  min-height: 110px;
  resize: vertical;
}

.upg-sepa-form input::placeholder,
.upg-sepa-form textarea::placeholder {
  color: var(--upg-muted);
  opacity: 0.76;
}

.upg-sepa-form input[type="text"]:focus,
.upg-sepa-form input[type="email"]:focus,
.upg-sepa-form textarea:focus {
  border-color: var(--upg-blue);
  box-shadow: 0 0 0 3px rgba(45, 136, 201, 0.12);
}

.upg-sepa-form input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0.15rem 0 0 0;
  accent-color: var(--upg-blue);
  flex: 0 0 18px;
}

.upg-sepa-form [data-grav-field="checkbox"] .form-data,
.upg-sepa-form .checkboxes {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}

.upg-sepa-form [data-grav-field="checkbox"] label,
.upg-sepa-form .checkboxes label {
  font-weight: 400;
  line-height: 1.55;
}

.upg-sepa-privacy-note {
  margin: -0.35rem 0 0.95rem 2rem;
  color: var(--upg-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.upg-sepa-form a,
.upg-sepa-privacy-note a {
  color: var(--upg-blue);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

.upg-sepa-form .buttons {
  margin-top: 1.65rem;
}

.upg-sepa-form button[type="submit"],
.upg-sepa-form input[type="submit"] {
  min-height: 46px;
  padding: 0.75rem 1.15rem;
  border: 1px solid var(--upg-blue);
  border-radius: 10px;
  background: var(--upg-blue);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 120ms ease, filter 120ms ease;
}

.upg-sepa-form button[type="submit"]:hover,
.upg-sepa-form input[type="submit"]:hover {
  filter: brightness(0.96);
}

.upg-sepa-form button[type="submit"]:active,
.upg-sepa-form input[type="submit"]:active {
  transform: translateY(1px);
}

.upg-sepa-form .form-errors,
.upg-sepa-form .form-message,
.upg-sepa-form .error,
.upg-sepa-error {
  color: #b42318;
}

html[data-theme="dark"] .upg-sepa-form .form-errors,
html[data-theme="dark"] .upg-sepa-form .form-message,
html[data-theme="dark"] .upg-sepa-form .error,
html[data-theme="dark"] .upg-sepa-error {
  color: #ffb4ab;
}

@media (max-width: 640px) {
  .upg-sepa {
    padding-top: 1.8rem;
  }

  .upg-sepa-shell {
    padding: 1rem;
    border-radius: 14px;
  }

  .upg-sepa-meta {
    grid-template-columns: 1fr;
  }

  .upg-sepa-meta > div,
  .upg-sepa-meta > div:nth-child(even) {
    padding: 0.95rem 0;
    border-left: 0;
  }

  .upg-sepa-meta > div:nth-child(n + 2) {
    border-top: 1px solid var(--upg-line);
  }

  .upg-sepa-form-panel {
    padding: 1rem;
    border-radius: 12px;
  }

  .upg-sepa-mandate {
    padding-left: 1rem;
  }

  .upg-sepa-privacy-note {
    margin-left: 0;
    font-size: 0.9rem;
  }

  .upg-sepa-form button[type="submit"],
  .upg-sepa-form input[type="submit"] {
    width: 100%;
  }
}
/* === UPGRAIT LASTSCHRIFT V0.14 END === */

/* === UPGRAIT LASTSCHRIFT TYPOGRAPHY V0.15 BEGIN === */
/* ==========================================================
   UPGRAIT SEPA typography v0.15
   Aligns /lastschrift with regular .content-item pages
   such as /datenschutz.
   ========================================================== */

/* Use exactly the same local Manrope stack and base weight as normal pages. */
.upg-sepa-shell {
  font-family: var(--upg-font-sans, "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif) !important;
  font-weight: 400;
}

/* Match the regular content heading hierarchy from UPGRAIT typography v0.10. */
.upg-sepa-shell h1 {
  margin-top: 0;
  margin-bottom: 1.75rem;
  color: var(--q2-text-strong);
  font-family: var(--upg-font-sans, "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif) !important;
  font-size: clamp(2rem, 3.4vw, 2.35rem);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.upg-sepa-shell h2 {
  color: var(--q2-text-strong);
  font-family: var(--upg-font-sans, "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif) !important;
  font-size: clamp(1.5rem, 2.4vw, 1.7rem);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

.upg-sepa-shell h3 {
  color: var(--q2-text-strong);
  font-family: var(--upg-font-sans, "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif) !important;
  font-size: clamp(1.18rem, 1.8vw, 1.32rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* Narrative copy should feel identical to Datenschutz. */
.upg-sepa-intro,
.upg-sepa-intro p,
.upg-sepa-mandate,
.upg-sepa-mandate p,
.upg-sepa-privacy-note {
  font-family: inherit !important;
  font-weight: 400;
}

.upg-sepa-intro p,
.upg-sepa-mandate p {
  line-height: 1.78;
}

/* Keep the special sections compact while retaining the same heading typography. */
.upg-sepa-mandate h2,
.upg-sepa-form-panel > h2 {
  font-family: inherit !important;
  font-size: clamp(1.5rem, 2.4vw, 1.7rem);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.018em;
}

.upg-sepa-mandate h2 {
  margin: 0 0 1rem;
}

.upg-sepa-form-panel > h2 {
  margin: 0 0 1.35rem;
}

/* Form copy: same family, calmer weight than the previous 600 labels. */
.upg-sepa-form,
.upg-sepa-form input,
.upg-sepa-form textarea,
.upg-sepa-form button,
.upg-sepa-form label,
.upg-sepa-form .form-label {
  font-family: inherit !important;
}

.upg-sepa-form label,
.upg-sepa-form .form-label {
  font-size: 1rem;
  font-weight: 500;
}

.upg-sepa-form [data-grav-field="checkbox"] label,
.upg-sepa-form .checkboxes label {
  font-weight: 400;
}

/* Small meta labels are UI labels, not headings. Keep them restrained. */
.upg-sepa-meta-label {
  font-family: inherit !important;
  font-weight: 500;
}

.upg-sepa-meta strong {
  font-family: inherit !important;
  font-weight: 500;
}

.upg-sepa-meta span:not(.upg-sepa-meta-label) {
  font-family: inherit !important;
  font-weight: 400;
}

/* Button remains an action element, but uses the same Manrope family. */
.upg-sepa-form button[type="submit"],
.upg-sepa-form input[type="submit"] {
  font-family: inherit !important;
  font-weight: 600;
}

@media (max-width: 640px) {
  /* Match the mobile content typography used on Datenschutz. */
  .upg-sepa-shell {
    font-size: 0.94rem;
    line-height: 1.62;
  }

  .upg-sepa-shell h1 {
    font-size: 1.85rem;
    line-height: 1.17;
  }

  .upg-sepa-shell h2,
  .upg-sepa-mandate h2,
  .upg-sepa-form-panel > h2 {
    font-size: 1.42rem;
    line-height: 1.24;
  }

  .upg-sepa-shell h3 {
    font-size: 1.14rem;
    line-height: 1.30;
  }

  .upg-sepa-intro p,
  .upg-sepa-mandate p,
  .upg-sepa-form label,
  .upg-sepa-form .form-label,
  .upg-sepa-privacy-note {
    font-size: 0.94rem;
  }

  .upg-sepa-intro p,
  .upg-sepa-mandate p {
    line-height: 1.62;
  }
}
/* === UPGRAIT LASTSCHRIFT TYPOGRAPHY V0.15 END === */

/* === UPGRAIT HOME HEADLINE V0.16 BEGIN === */
/* ==========================================================
   UPGRAIT Home headline v0.16
   Calmer hero scale: 1–2 lines instead of oversized display type.
   ========================================================== */

.upg-hero h1 {
  max-width: 900px;
  font-size: clamp(3rem, 5vw, 4.6rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.04;
}

@media (max-width: 900px) {
  .upg-hero h1 {
    max-width: 18ch;
    font-size: clamp(2.65rem, 7vw, 3.8rem);
  }
}

@media (max-width: 640px) {
  .upg-hero h1 {
    max-width: 100%;
    font-size: clamp(2.15rem, 10vw, 2.75rem);
    letter-spacing: -0.035em;
    line-height: 1.08;
  }
}
/* === UPGRAIT HOME HEADLINE V0.16 END === */

/* === UPGRAIT HOME SPACING V0.17 BEGIN === */
/* ==========================================================
   UPGRAIT Home spacing v0.17
   Reduce stacked vertical spacing between hero video
   and imported start-page content.
   ========================================================== */

/*
  The start page previously stacked three vertical paddings here:
  1) .upg-hero bottom padding
  2) .upg-section top padding
  3) nested .content-item top padding

  Keep one deliberate spacing rhythm instead.
*/

.upgrait-home .upg-hero {
  padding-bottom: clamp(2.25rem, 4vw, 3.5rem);
}

.upgrait-home .upg-imported-content {
  padding: clamp(3rem, 5vw, 4.5rem) 0;
}

.upgrait-home .upg-imported-content > .content-item {
  padding-block: 0;
}

@media (max-width: 640px) {
  .upgrait-home .upg-hero {
    padding-bottom: 2rem;
  }

  .upgrait-home .upg-imported-content {
    padding: 2.5rem 0;
  }
}
/* === UPGRAIT HOME SPACING V0.17 END === */

/* === UPGRAIT KONTAKT V0.18 BEGIN === */
/* ==========================================================
   UPGRAIT Kontakt v0.18
   ========================================================== */

.upg-contact {
  padding: clamp(2.25rem, 5vw, 4.5rem) 0 5rem;
}

.upg-contact-container {
  max-width: 960px;
}

.upg-contact-shell {
  padding: clamp(1.4rem, 3vw, 2.35rem);
  border: 1px solid var(--upg-line);
  border-radius: 20px;
  background: var(--upg-surface);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.06);
}

html[data-theme="dark"] .upg-contact-shell {
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.22);
}

.upg-contact-intro {
  max-width: 760px;
  margin-bottom: 1.5rem;
}

.upg-contact-intro h1 {
  margin-top: 0;
}

.upg-contact-direct {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 0 2rem;
  border-top: 1px solid var(--upg-line);
  border-bottom: 1px solid var(--upg-line);
}

.upg-contact-direct__item {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding: 1.15rem 1.25rem 1.15rem 0;
  color: inherit;
  text-decoration: none;
}

.upg-contact-direct__item + .upg-contact-direct__item {
  padding-left: 1.25rem;
  border-left: 1px solid var(--upg-line);
}

.upg-contact-direct__label,
.upg-contact-kicker {
  color: var(--upg-muted);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.upg-contact-direct__item strong {
  color: var(--upg-text);
  font-size: 1.05rem;
  font-weight: 500;
}

.upg-contact-direct__item > span:last-child {
  color: var(--upg-muted);
  font-size: 0.92rem;
}

.upg-contact-direct__item:hover strong {
  color: var(--upg-blue);
}

.upg-contact-form-panel {
  padding: clamp(1.25rem, 2.5vw, 1.9rem);
  border: 1px solid var(--upg-line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--upg-surface) 70%, var(--upg-canvas) 30%);
}

.upg-contact-form-heading {
  margin-bottom: 1.45rem;
}

.upg-contact-form-heading h2 {
  margin: 0.35rem 0 0.45rem;
}

.upg-contact-form-heading p {
  margin: 0;
  color: var(--upg-muted);
}

.upg-contact-form .form-field {
  margin-bottom: 1.15rem;
}

.upg-contact-form label,
.upg-contact-form .form-label {
  color: var(--upg-text);
  font-family: inherit !important;
  font-size: 1rem;
  font-weight: 500;
}

.upg-contact-form input[type="text"],
.upg-contact-form input[type="email"],
.upg-contact-form input[type="tel"],
.upg-contact-form textarea,
.upg-contact-form select {
  box-sizing: border-box;
  width: 100%;
  min-height: 46px;
  margin-top: 0.4rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--upg-line);
  border-radius: 10px;
  outline: none;
  background: var(--upg-canvas);
  color: var(--upg-text);
  font: inherit;
  line-height: 1.45;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.upg-contact-form textarea {
  min-height: 130px;
  resize: vertical;
}

.upg-contact-form input:focus,
.upg-contact-form textarea:focus,
.upg-contact-form select:focus {
  border-color: var(--upg-blue);
  box-shadow: 0 0 0 3px rgba(45, 136, 201, 0.12);
}

.upg-contact-form input[type="radio"] {
  width: 18px;
  height: 18px;
  margin-right: 0.45rem;
  accent-color: var(--upg-blue);
}

.upg-contact-form [data-grav-field="radio"] .form-data,
.upg-contact-form .radio {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.15rem;
}

.upg-contact-form [data-grav-field="radio"] label,
.upg-contact-form .radio label {
  font-weight: 400;
}

.upg-contact-privacy {
  margin: 0.35rem 0 1rem;
  color: var(--upg-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.upg-contact-privacy a {
  color: var(--upg-blue);
  text-underline-offset: 0.16em;
}

.upg-contact-form .buttons {
  margin-top: 0;
}

.upg-contact-form button[type="submit"],
.upg-contact-form input[type="submit"] {
  min-height: 46px;
  padding: 0.75rem 1.15rem;
  border: 1px solid var(--upg-blue);
  border-radius: 10px;
  background: var(--upg-blue);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.upg-contact-form button[type="submit"]:hover,
.upg-contact-form input[type="submit"]:hover {
  filter: brightness(0.96);
}

.upg-contact-error,
.upg-contact-form .form-errors,
.upg-contact-form .form-message,
.upg-contact-form .error {
  color: #b42318;
}

html[data-theme="dark"] .upg-contact-error,
html[data-theme="dark"] .upg-contact-form .form-errors,
html[data-theme="dark"] .upg-contact-form .form-message,
html[data-theme="dark"] .upg-contact-form .error {
  color: #ffb4ab;
}

@media (max-width: 640px) {
  .upg-contact {
    padding-top: 1.8rem;
  }

  .upg-contact-shell {
    padding: 1rem;
    border-radius: 14px;
  }

  .upg-contact-direct {
    grid-template-columns: 1fr;
  }

  .upg-contact-direct__item,
  .upg-contact-direct__item + .upg-contact-direct__item {
    padding: 0.95rem 0;
    border-left: 0;
  }

  .upg-contact-direct__item + .upg-contact-direct__item {
    border-top: 1px solid var(--upg-line);
  }

  .upg-contact-form-panel {
    padding: 1rem;
    border-radius: 12px;
  }

  .upg-contact-form label,
  .upg-contact-form .form-label,
  .upg-contact-form-heading p,
  .upg-contact-privacy {
    font-size: 0.94rem;
  }

  .upg-contact-form button[type="submit"],
  .upg-contact-form input[type="submit"] {
    width: 100%;
  }
}
/* === UPGRAIT KONTAKT V0.18 END === */

/* === UPGRAIT KONTAKT EDITOR V0.19 BEGIN === */
/* ==========================================================
   UPGRAIT Kontakt editor-friendly v0.19
   Visible editorial content now comes from page.content.
   ========================================================== */

.upg-contact-content {
  max-width: 780px;
  margin-bottom: 1.5rem;
}

.upg-contact-content h1 {
  margin-top: 0;
}

.upg-contact-content h2 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.upg-contact-content p {
  margin-bottom: 0.8rem;
}

.upg-contact-content a {
  color: var(--upg-blue);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

.upg-contact-content strong {
  font-weight: 600;
}

.upg-contact-form-panel {
  margin-top: 1.35rem;
}

@media (max-width: 640px) {
  .upg-contact-content {
    margin-bottom: 1rem;
  }

  .upg-contact-content h2 {
    margin-top: 1.55rem;
  }

  .upg-contact-form-panel {
    margin-top: 1rem;
  }
}
/* === UPGRAIT KONTAKT EDITOR V0.19 END === */

/* === UPGRAIT HOME TESTIMONIALS V0.21 BEGIN === */
/* ==========================================================
   UPGRAIT Home testimonials v0.21
   Restores the customer-review tiles while keeping the content
   as normal Markdown in the Grav page editor.
   ========================================================== */

/*
  The testimonial Markdown is rendered as one <blockquote> containing
  one <p> per review. Recent generic content/blockquote styling turned
  that into a single long quote block. Convert only this start-page
  h2-following blockquote back into a responsive card grid.
*/

.upgrait-home .upg-imported-content h2 + blockquote {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-style: normal;
}

.upgrait-home .upg-imported-content h2 + blockquote::before,
.upgrait-home .upg-imported-content h2 + blockquote::after {
  content: none;
}

.upgrait-home .upg-imported-content h2 + blockquote > p {
  position: relative;
  margin: 0;
  padding: 1.35rem 1.4rem 1.3rem;
  border: 1px solid var(--upg-line);
  border-radius: 16px;
  background: var(--upg-surface);
  color: var(--upg-text);
  font-size: 0.98rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1.65;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.035);
}

html[data-theme="dark"] .upgrait-home .upg-imported-content h2 + blockquote > p {
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.14);
}

.upgrait-home .upg-imported-content h2 + blockquote > p::before {
  content: "“";
  display: block;
  height: 1.2rem;
  margin-bottom: 0.6rem;
  color: var(--upg-blue);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.2rem;
  font-weight: 400;
  line-height: 1;
}

@media (max-width: 760px) {
  .upgrait-home .upg-imported-content h2 + blockquote {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .upgrait-home .upg-imported-content h2 + blockquote > p {
    padding: 1.15rem 1.2rem;
    font-size: 0.94rem;
  }
}
/* === UPGRAIT HOME TESTIMONIALS V0.21 END === */
