/* ============================================
   QCE AG - Static Website (No WordPress)
   ============================================ */

/* ============================================
   Local Fonts
   ============================================ */
@font-face {
  font-family: "Roboto";
  src: url("../fonts/Roboto-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Roboto";
  src: url("../fonts/Roboto-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Roboto";
  src: url("../fonts/Roboto-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Raleway";
  src: url("../fonts/Raleway-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ============================================
   Tokens
   ============================================ */
:root {
  --qce-blue: #002f5f;
  --qce-blue-mid: #0b3f73;
  --qce-blue-deep: #001f3f;
  --qce-red: #e31d2c;

  --bg-light: #ecf2f8;
  --bg-mist: #bacadb;
  --bg-soft: #d8e3ef;

  --text-dark: #12243a;
  --text-mid: #35506f;
  --text-light: #f2f7fd;
  --shared-card-rgb: 231, 237, 246;
  --shared-card-alpha: 0.66;

  --border-soft: rgba(14, 53, 94, 0.18);
  --shadow-soft: 0 8px 24px rgba(8, 37, 68, 0.2);
  --shadow-strong: 0 20px 48px rgba(2, 24, 51, 0.3);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4rem;

  --font-body: "Roboto", "Segoe UI", Arial, sans-serif;
  --font-title: "Raleway", "Roboto", "Segoe UI", Arial, sans-serif;

  --header-height: 84px;
  --max-width: 1220px;

  --transition-fast: 160ms ease;
  --transition-base: 260ms ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-dark);
  background: var(--bg-soft);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--qce-blue-mid);
  text-decoration: none;
}

a:hover {
  color: var(--qce-blue-deep);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 var(--space-3);
  font-family: var(--font-title);
  line-height: 1.15;
  letter-spacing: 0.01em;
}

p {
  margin: 0 0 var(--space-3);
}

ul {
  margin: 0;
  padding: 0;
}

address {
  font-style: normal;
}

strong {
  font-weight: 700;
}

/* ============================================
   Utilities
   ============================================ */
.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 9999;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--qce-blue);
  color: #fff;
}

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

.section {
  padding: clamp(3.4rem, 6vw, 5.8rem) 0;
}

.section--blue {
  background: var(--qce-blue);
  color: var(--text-light);
}

.section--slate {
  background: linear-gradient(180deg, var(--qce-blue-mid) 0%, var(--qce-blue) 100%);
  color: var(--text-light);
}

.section--mist {
  background: var(--bg-mist);
}

.section--light {
  background: var(--bg-light);
}

.section--with-bg {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.section--with-bg::before,
.section--with-bg::after {
  content: "";
  position: absolute;
  inset: 0;
}

.section--with-bg::before {
  background-image: var(--section-bg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.section--with-bg::after {
  background: var(--section-overlay, linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.9)));
  z-index: 1;
}

.section--with-bg > .container {
  position: relative;
  z-index: 2;
}

.section-header {
  text-align: center;
  width: min(100%, 920px);
  margin: 0 auto clamp(1.85rem, 4vw, 3.2rem);
}

.section-title {
  font-size: clamp(1.95rem, 4.5vw, 3rem);
  color: var(--qce-blue);
  text-transform: uppercase;
  margin-bottom: 0.82rem;
}

.section-subtitle {
  font-size: clamp(1.08rem, 2.15vw, 1.35rem);
  color: var(--text-mid);
  margin-bottom: 0.58rem;
}

.section-lead {
  font-size: clamp(1rem, 1.7vw, 1.16rem);
  color: var(--text-dark);
}

.section--blue .section-title,
.section--blue .section-subtitle,
.section--blue .section-lead,
.section--slate .section-title,
.section--slate .section-subtitle,
.section--slate .section-lead,
.projects--showcase .section-title,
.projects--showcase .section-subtitle,
.projects--showcase .section-lead {
  color: var(--text-light);
}

/* ============================================
   Floating Language Switch
   ============================================ */
.floating-lang {
  position: fixed;
  z-index: 1300;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2rem;
  padding: 0.3rem 0.68rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(11, 63, 115, 0.16);
  box-shadow: 0 6px 16px rgba(4, 31, 60, 0.16);
  backdrop-filter: blur(5px);
}

.lang-link {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #5f7690;
  transition: color var(--transition-fast);
}

.lang-link:hover,
.lang-link:focus-visible {
  color: var(--qce-blue);
}

.lang-link--active {
  color: var(--qce-blue);
}

.lang-divider {
  color: #a4b7cb;
  font-size: 0.75rem;
}

/* ============================================
   Optional Header (Legal Pages)
   ============================================ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1100;
  min-height: var(--header-height);
  background: rgba(237, 243, 250, 0.92);
  border-bottom: 1px solid rgba(18, 64, 109, 0.08);
  backdrop-filter: blur(8px);
  transition: box-shadow var(--transition-base), background-color var(--transition-base);
}

.site-header.scrolled {
  box-shadow: 0 8px 28px rgba(8, 33, 60, 0.14);
  background: rgba(237, 243, 250, 0.98);
}

.header-inner {
  min-height: var(--header-height);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.2rem;
}

.logo {
  display: inline-flex;
  align-items: center;
}

.logo-img {
  height: clamp(38px, 5vw, 54px);
  width: auto;
}

.main-nav {
  justify-self: center;
}

.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2rem;
  padding: 0 0.35rem;
  font-size: 0.98rem;
  font-weight: 600;
  color: #2d4c6f;
  border-bottom: 2px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--qce-blue);
  border-color: var(--qce-blue);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2rem;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(11, 63, 115, 0.16);
  box-shadow: 0 3px 12px rgba(4, 31, 60, 0.12);
}

.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  padding: 0.2rem;
  cursor: pointer;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--qce-blue);
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.hamburger {
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  left: 0;
}

.hamburger::before {
  top: -7px;
}

.hamburger::after {
  top: 7px;
}

.nav-toggle[aria-expanded="true"] .hamburger {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .hamburger::before {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   Hero
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
}

.hero-static-bg,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-static-bg {
  background: url("../assets/images/hero-bg.jpg") center center / cover no-repeat;
  background-attachment: fixed;
}

.hero-overlay {
  background:
    linear-gradient(180deg, rgba(0, 35, 72, 0.08) 0%, rgba(0, 34, 67, 0.4) 62%, rgba(0, 47, 95, 0.62) 100%),
    linear-gradient(90deg, rgba(0, 35, 66, 0.16) 0%, rgba(0, 27, 52, 0.08) 100%);
}

.hero-brand {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.hero-brand--center {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
}

.hero-brand--center img {
  width: min(80vw, 1080px);
  max-width: 80vw;
  height: auto;
  filter: drop-shadow(0 8px 22px rgba(4, 23, 46, 0.3));
}

/* ============================================
   Intro / Welcome
   ============================================ */
.intro-panel {
  min-height: 72vh;
  padding: clamp(2rem, 3.1vw, 2.8rem) 0;
  display: flex;
  align-items: center;
}

.intro-panel--visual {
  background: #003a73;
}

.intro-panel--visual.section--with-bg::before,
.intro-panel--visual.section--with-bg::after {
  display: none;
}

.intro-panel--visual > .container {
  width: min(100% - 4rem, 1700px);
}

.intro-layout {
  display: grid;
  grid-template-columns: minmax(460px, 1fr) minmax(420px, 0.98fr);
  gap: clamp(1.6rem, 3.4vw, 3rem);
  align-items: stretch;
}

.intro-text-block {
  padding: clamp(1.1rem, 2.3vw, 1.8rem) clamp(0.3rem, 0.6vw, 0.65rem);
  color: rgba(241, 247, 253, 0.95);
}

.intro-text-block .eyebrow {
  margin: 0;
  color: #ff3241;
  font-size: clamp(2rem, 2.8vw, 3rem);
  text-transform: none;
  letter-spacing: 0;
  line-height: 1;
  font-family: var(--font-title);
  font-weight: 700;
}

.intro-text-block h1 {
  margin: 0 0 1rem;
  color: #ffffff;
  text-transform: uppercase;
  font-size: clamp(3rem, 5.5vw, 5.3rem);
  line-height: 0.96;
}

.intro-text-block p {
  font-size: clamp(0.99rem, 1.05vw, 1.12rem);
  line-height: 1.47;
  margin-bottom: 0.72rem;
}

.intro-text-block p:last-child {
  margin-bottom: 0;
}

.intro-side-image {
  margin: 0;
  border-radius: 0;
  overflow: hidden;
  min-height: 100%;
  border: 0;
  box-shadow: none;
  align-self: start;
  height: clamp(430px, 57vh, 650px);
  background: url("../assets/images/section-bg-2.jpg") center center / cover no-repeat fixed;
}

.intro-side-image img {
  display: none;
}

/* ============================================
   Accreditation
   ============================================ */
.accreditation {
  --section-bg: url("../assets/images/section-bg-5.jpg");
  --section-overlay: linear-gradient(180deg, rgba(20, 44, 68, 0.58) 0%, rgba(9, 27, 47, 0.65) 100%);
  min-height: 95vh;
}

.accreditation .section-header {
  width: min(100%, 1380px);
  margin: 0 0 clamp(1.6rem, 3vw, 2.6rem);
  text-align: left;
}

.accreditation .section-title,
.accreditation .section-subtitle,
.accreditation .section-lead {
  color: rgba(248, 251, 255, 0.98);
}

.accreditation .section-title {
  font-size: clamp(2.2rem, 4.4vw, 4rem);
  margin-bottom: 0.45rem;
}

.accreditation .section-subtitle {
  font-size: clamp(1.25rem, 2.15vw, 1.9rem);
}

.accreditation .section-lead {
  font-size: clamp(1rem, 1.24vw, 1.16rem);
  line-height: 1.52;
  max-width: 1280px;
  margin-bottom: 0.72rem;
}

.accreditation .section-lead a {
  color: rgba(245, 251, 255, 0.95);
  text-decoration: underline;
}

.glass-card-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.9rem;
}

.glass-card {
  flex: 0 1 calc((100% - 3.8rem) / 3);
  max-width: 408px;
  min-height: 160px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(var(--shared-card-rgb), var(--shared-card-alpha));
  box-shadow: 0 8px 22px rgba(2, 29, 56, 0.25);
  backdrop-filter: blur(4px);
  padding: 0.8rem 0.9rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-align: left;
}

.glass-card h3 {
  margin-bottom: 0.35rem;
  color: var(--qce-blue);
  font-size: 1rem;
  line-height: 1.25;
  text-transform: uppercase;
}

.glass-card p {
  margin: 0;
  color: #20456d;
  font-size: 0.94rem;
  line-height: 1.5;
}

/* ============================================
   Trust
   ============================================ */
.trust .container {
  width: min(100% - 2rem, 1560px);
}

.trust .section-title,
.trust .section-subtitle,
.trust-copy {
  width: min(100%, 1460px);
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.trust .section-title {
  margin-bottom: 0.62rem;
}

.trust .section-subtitle {
  margin-bottom: 0.7rem;
}

.trust-copy {
  margin-bottom: 0;
  font-size: clamp(1rem, 1.35vw, 1.14rem);
  line-height: 1.56;
  color: rgba(243, 247, 252, 0.96);
}

/* ============================================
   Methods
   ============================================ */
.methods {
  --section-bg: url("../assets/images/section-bg-2.jpg");
  --section-overlay: linear-gradient(180deg, rgba(0, 40, 76, 0.85) 0%, rgba(0, 47, 95, 0.92) 100%);
  min-height: 88vh;
}

.methods .section-header {
  margin-bottom: 1.6rem;
}

.methods-carousel {
  display: flex;
  align-items: stretch;
  gap: 1.4rem;
}

.methods-scroll-hint {
  display: none;
}

.carousel-arrow {
  width: 2.4rem;
  min-width: 2.4rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--qce-blue);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 20, 49, 0.25);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.carousel-arrow:hover:not(:disabled) {
  transform: translateY(-2px);
}

.carousel-arrow:disabled {
  opacity: 0.42;
  cursor: default;
}

.carousel-viewport {
  overflow: hidden;
  width: 100%;
}

.carousel-track {
  display: flex;
  align-items: stretch;
  gap: 1.9rem;
  transition: transform var(--transition-base);
  will-change: transform;
}

.method-card {
  flex: 0 0 100%;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(var(--shared-card-rgb), var(--shared-card-alpha));
  box-shadow: 0 8px 22px rgba(2, 29, 56, 0.25);
  padding: 1rem;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.method-icon {
  width: 54px;
  height: 54px;
  margin-bottom: 0.65rem;
}

.method-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.method-card h3 {
  margin-bottom: 0.5rem;
  color: var(--qce-blue);
  font-size: 1rem;
  text-transform: uppercase;
  line-height: 1.25;
}

.method-card p {
  margin: 0;
  color: #20456d;
  font-size: 0.94rem;
  line-height: 1.5;
}

/* ============================================
   Dynamic Background (Component Testing)
   ============================================ */
.component-testing {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
}

.section-dynamic-bg,
.section-dynamic-overlay {
  position: absolute;
  inset: 0;
}

.section-dynamic-bg {
  z-index: 0;
}

.dynamic-bg-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 900ms ease;
}

.dynamic-bg-slide.is-active {
  opacity: 1;
}

.section-dynamic-overlay {
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(0, 35, 72, 0.08) 0%, rgba(0, 34, 67, 0.4) 62%, rgba(0, 47, 95, 0.62) 100%),
    linear-gradient(90deg, rgba(0, 35, 66, 0.16) 0%, rgba(0, 27, 52, 0.08) 100%);
}

.component-testing .container {
  position: relative;
  z-index: 2;
}

.component-testing .section-title,
.component-testing .section-subtitle,
.component-testing .section-lead {
  color: rgba(247, 251, 255, 0.98);
  text-shadow: 0 2px 12px rgba(0, 20, 42, 0.45);
}

.component-card {
  width: min(100%, 940px);
  margin: 0 auto;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(6, 47, 87, 0.16);
  background: rgba(var(--shared-card-rgb), var(--shared-card-alpha));
  box-shadow: var(--shadow-soft);
  padding: clamp(1.25rem, 2.8vw, 1.95rem);
}

.component-card h3 {
  color: var(--qce-blue);
  font-size: clamp(1.2rem, 2vw, 1.46rem);
  margin-bottom: 0.7rem;
}

.component-card p {
  color: var(--text-dark);
}

.component-list {
  list-style: none;
  display: grid;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.component-list li {
  position: relative;
  padding-left: 1.1rem;
  color: #14395f;
  font-size: 0.98rem;
}

.component-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58rem;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--qce-red);
}

/* ============================================
   Partner
   ============================================ */
.partner .section-subtitle {
  margin-bottom: 0;
  color: rgba(239, 245, 251, 0.92);
}

/* ============================================
   References
   ============================================ */
.references {
  --section-bg: url("../assets/images/section-bg-4.jpg");
  --section-overlay: linear-gradient(165deg, rgba(24, 58, 92, 0.56) 0%, rgba(17, 45, 74, 0.68) 100%);
  min-height: 96vh;
}

.references.section--with-bg::before {
  background-attachment: fixed;
}

.references .section-header {
  width: min(100%, 1820px);
  text-align: left;
  margin: 0 0 clamp(1.7rem, 3.2vw, 3rem);
}

.references .section-title {
  color: rgba(247, 251, 255, 0.98);
  font-size: clamp(2.2rem, 5vw, 5.3rem);
  margin-bottom: 0.35rem;
}

.references .section-subtitle {
  color: rgba(243, 248, 255, 0.94);
  font-size: clamp(1.34rem, 2.2vw, 2.05rem);
}

.references-intro {
  color: rgba(239, 246, 255, 0.94);
  font-size: clamp(1.08rem, 1.26vw, 1.36rem);
  line-height: 1.45;
  margin-bottom: 0;
  max-width: 1750px;
}

.references-logo-wall {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(1.45rem, 2.2vw, 2.15rem) clamp(1.7rem, 2.3vw, 2.5rem);
  padding: clamp(1.8rem, 2.8vw, 2.6rem) clamp(1.9rem, 2.8vw, 2.8rem);
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  background: rgba(var(--shared-card-rgb), var(--shared-card-alpha));
  box-shadow: 0 20px 48px rgba(5, 28, 54, 0.24);
  backdrop-filter: blur(6px);
}

.references-logo-wall img {
  max-height: 88px;
  width: auto;
  max-width: 100%;
  justify-self: center;
  align-self: center;
  opacity: 1;
}

/* ============================================
   Projects / Exzellenz
   ============================================ */
.projects--showcase {
  --section-bg: url("../assets/images/section-bg-5.jpg");
  --section-overlay: linear-gradient(180deg, rgba(0, 33, 66, 0.82) 0%, rgba(0, 31, 62, 0.93) 100%);
  min-height: 92vh;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.1vw, 1.45rem);
}

.project-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(240, 247, 254, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(2px);
}

.project-image {
  height: 244px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-content {
  padding: 1.06rem 1.1rem 1.25rem;
}

.project-content h3 {
  margin-bottom: 0.55rem;
  color: #f2f8ff;
  font-size: 1.18rem;
}

.project-content p {
  margin: 0;
  color: rgba(228, 240, 252, 0.94);
  font-size: 0.96rem;
  line-height: 1.55;
}

/* ============================================
   Contact
   ============================================ */
.contact--visual {
  --section-bg: url("../assets/images/section-bg-1.jpg");
  --section-overlay: linear-gradient(172deg, rgba(24, 57, 88, 0.54) 0%, rgba(17, 47, 77, 0.62) 58%, rgba(10, 38, 66, 0.69) 100%);
  min-height: 86vh;
}

.contact--visual .section-title,
.contact--visual .section-subtitle,
.contact--visual .contact-lead {
  color: rgba(247, 251, 255, 0.98);
}

.contact-lead {
  margin-bottom: 0;
}

.contact .section-header {
  width: min(100%, 1360px);
}

@media (min-width: 1200px) {
  .trust .section-title,
  .contact .section-title {
    white-space: nowrap;
  }
}

.contact-form {
  width: min(100%, 720px);
  margin: 0 auto;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(8, 47, 88, 0.16);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
  padding: clamp(1rem, 3vw, 2rem);
}

.form-status {
  display: none;
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem;
  margin-bottom: 0.9rem;
  font-size: 0.95rem;
}

.form-status.success {
  display: block;
  background: #dff7e4;
  border: 1px solid #6ac47b;
  color: #14572b;
}

.form-status.error {
  display: block;
  background: #fde6e7;
  border: 1px solid #ee8e95;
  color: #7d1a23;
}

.form-group {
  margin-bottom: 0.95rem;
}

.form-label {
  display: block;
  margin-bottom: 0.38rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--qce-blue);
}

.form-input,
.form-textarea {
  width: 100%;
  border: 1px solid rgba(12, 58, 104, 0.24);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.72rem 0.78rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--qce-blue-mid);
  box-shadow: 0 0 0 3px rgba(11, 63, 115, 0.12);
}

.form-textarea {
  resize: vertical;
  min-height: 150px;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: pointer;
}

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

.form-checkbox-text {
  font-size: 0.9rem;
  color: #355271;
}

.form-honeypot {
  position: absolute;
  left: -9999px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  min-height: 2.8rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.btn--primary {
  background: var(--qce-blue);
  color: #fff;
  box-shadow: 0 8px 18px rgba(2, 31, 60, 0.18);
}

.btn--primary:hover {
  background: var(--qce-blue-mid);
  transform: translateY(-1px);
}

.btn--full {
  width: 100%;
}

/* ============================================
   Career
   ============================================ */
.career-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(1rem, 2.4vw, 1.6rem);
  align-items: stretch;
}

.career-content h3 {
  color: var(--qce-blue);
  font-size: clamp(1.24rem, 2.1vw, 1.45rem);
  margin-bottom: 0.5rem;
}

.career-content p {
  color: #1d4168;
}

.career-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.64fr);
  gap: 1.2rem;
  margin-top: 0.8rem;
  align-items: start;
}

.career-columns > div:last-child {
  max-width: 240px;
}

.career-columns > div:last-child p {
  max-width: 23ch;
}

.career-columns h4 {
  margin-bottom: 0.45rem;
  color: var(--qce-blue);
  font-size: 1.03rem;
}

.career-columns ul {
  list-style: none;
  display: grid;
  gap: 0.4rem;
}

.career-columns li {
  position: relative;
  padding-left: 1.55rem;
  color: #1c4269;
}

.career-columns li::before {
  content: "";
  width: 0.95rem;
  height: 0.95rem;
  position: absolute;
  left: 0;
  top: 0.38rem;
  background: url("../assets/icons/swiss-flag.svg") center center / contain no-repeat;
  border-radius: 2px;
}

.career-image {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(9, 49, 90, 0.16);
  min-height: 100%;
  height: 100%;
  align-self: stretch;
  display: flex;
}

.career-image img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: var(--qce-blue-deep);
  color: rgba(236, 244, 252, 0.92);
  padding: 1.35rem 0 0.9rem;
}

.footer-content {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(610px, 1.2fr) minmax(300px, 1fr);
  gap: clamp(1.8rem, 3.8vw, 3.8rem);
  align-items: start;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  justify-self: center;
  margin-left: 0;
}

.footer-logo {
  width: min(100%, 430px);
  height: auto;
}

.footer-offices {
  display: grid;
  grid-template-columns: minmax(235px, 1fr) minmax(335px, 1.45fr);
  gap: 1rem;
  justify-self: center;
  width: min(100%, 760px);
}

.footer-office h3 {
  margin-bottom: 0.35rem;
  color: #fff;
  font-size: 1.03rem;
}

.footer-office address {
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-office a {
  color: rgba(238, 246, 255, 0.95);
}

.footer-links {
  display: grid;
  gap: 0.28rem;
  text-align: right;
  justify-self: end;
  min-width: 260px;
}

.footer-legal-links {
  display: grid;
  gap: 0.24rem;
  margin-bottom: 0.3rem;
}

.footer-cert-links {
  display: grid;
  gap: 0.24rem;
}

.footer-links h4 {
  margin: 0.32rem 0 0.38rem;
  color: var(--qce-red);
  font-size: 0.94rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer-links a {
  display: block;
  color: rgba(235, 244, 252, 0.92);
  font-size: 0.9rem;
}

/* ============================================
   Legal Pages
   ============================================ */
.legal-page {
  margin-top: var(--header-height);
  padding: 2rem 0 3rem;
  background: var(--bg-light);
}

.legal-content {
  width: min(100%, 980px);
  margin: 0 auto;
  border-radius: var(--radius-md);
  border: 1px solid rgba(7, 46, 85, 0.14);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(4, 30, 60, 0.08);
  padding: clamp(1rem, 2.5vw, 2rem);
}

.legal-title {
  color: var(--qce-blue);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  margin-bottom: 0.85rem;
}

.legal-content h2 {
  margin-top: 1.2rem;
  margin-bottom: 0.45rem;
  color: var(--qce-blue-mid);
  font-size: 1.15rem;
}

.legal-content p,
.legal-content li {
  color: #284b6f;
}

.legal-content ul {
  padding-left: 1rem;
}

/* ============================================
   Motion
   ============================================ */
.fade-in-scroll {
  opacity: 1;
  transform: none;
}

.has-motion .fade-in-scroll {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 580ms ease, transform 580ms ease;
}

.has-motion .fade-in-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Responsive
   ============================================ */
@media (min-width: 760px) {
  .carousel-arrow {
    display: none;
  }

  .carousel-viewport {
    overflow: visible;
  }

  .carousel-track {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.9rem;
    transform: none !important;
    transition: none;
  }

  .method-card {
    flex: 0 0 calc((100% - 1.9rem) / 2);
    max-width: 540px;
  }
}

@media (min-width: 1024px) {
  .method-card {
    flex: 0 0 calc((100% - 3.8rem) / 3);
    max-width: 408px;
  }
}

@media (max-width: 1200px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }

  .footer-brand {
    width: 100%;
    justify-content: center;
  }

  .footer-links {
    justify-self: start;
    text-align: left;
  }

  .footer-links {
    min-width: auto;
  }
}

@media (max-width: 1100px) {
  .header-inner {
    grid-template-columns: auto auto auto;
    justify-content: space-between;
  }

  .main-nav {
    justify-self: end;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-list {
    position: absolute;
    top: calc(var(--header-height) - 2px);
    left: 0;
    right: 0;
    display: grid;
    gap: 0;
    background: rgba(236, 243, 250, 0.99);
    border-bottom: 1px solid rgba(8, 47, 85, 0.1);
    box-shadow: 0 14px 26px rgba(5, 30, 58, 0.16);
    transform: translateY(-115%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition-base), opacity var(--transition-base);
  }

  .main-nav.open .nav-list {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link {
    height: 2.85rem;
    border-bottom: 1px solid rgba(11, 56, 97, 0.09);
  }

  .glass-card {
    flex-basis: calc((100% - 1.9rem) / 2);
  }

  .projects-grid,
  .career-grid,
  .career-columns,
  .intro-layout {
    grid-template-columns: 1fr;
  }

  .intro-panel--visual > .container {
    width: min(100% - 2rem, var(--max-width));
  }

  .intro-panel {
    min-height: auto;
    padding: 2rem 0;
  }

  .intro-side-image {
    min-height: 280px;
    overflow: hidden;
    height: auto;
    background-attachment: scroll;
    background-size: cover;
  }

  .intro-side-image img {
    display: block;
    width: 100%;
    height: 460px;
    object-fit: cover;
  }

  .career-columns > div:last-child {
    max-width: none;
  }

  .career-columns > div:last-child p {
    max-width: none;
  }

  .career-image {
    min-height: 0;
    height: auto;
    display: block;
  }

  .career-image img {
    aspect-ratio: 16 / 10;
    height: auto;
  }

  .project-image {
    height: 220px;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }

  :root {
    --header-height: 70px;
  }

  .container {
    width: min(100% - 1.2rem, var(--max-width));
  }

  .intro-panel--visual > .container {
    width: min(100% - 1.2rem, var(--max-width));
  }

  .floating-lang {
    top: max(8px, env(safe-area-inset-top));
    right: 8px;
    padding: 0.18rem 0.45rem;
  }

  .lang-link {
    font-size: 0.73rem;
  }

  .hero-brand--center img {
    width: min(80vw, 560px);
  }

  .hero-static-bg {
    background-attachment: scroll;
  }

  .references.section--with-bg::before {
    background-attachment: scroll;
  }

  .section {
    padding: 2.8rem 0;
  }

  .methods.section {
    height: 100vh;
    height: 100svh;
    min-height: 100vh;
    min-height: 100svh;
    padding: 1.2rem 0;
    overflow: hidden;
  }

  .methods > .container {
    height: calc(100svh - 2.4rem);
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }

  .methods .section-header {
    margin-bottom: 0.8rem;
    width: min(100%, 520px);
  }

  .methods-carousel {
    --methods-mobile-gap: 0.9rem;
    --methods-mobile-card-height: clamp(165px, 19svh, 200px);
    flex: 0 0 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    overflow: visible;
    width: min(100%, 520px);
    margin: 0 auto;
  }

  .methods .carousel-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    margin: 0 auto;
    font-size: 1.35rem;
    line-height: 1;
    z-index: 2;
  }

  .methods .carousel-viewport {
    width: 100%;
    height: calc((var(--methods-mobile-card-height) * 3) + (var(--methods-mobile-gap) * 2));
    max-height: calc((var(--methods-mobile-card-height) * 3) + (var(--methods-mobile-gap) * 2));
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    border-radius: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    position: relative;
  }

  .methods .carousel-viewport::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  .methods .carousel-viewport::after {
    content: none;
  }

  .methods .carousel-track {
    display: flex;
    flex-direction: column;
    gap: var(--methods-mobile-gap);
    align-items: stretch;
    transform: none !important;
  }

  .methods [data-carousel-prev] {
    transform: rotate(90deg);
  }

  .methods [data-carousel-next] {
    transform: rotate(90deg);
  }

  .methods .carousel-arrow:disabled {
    opacity: 0.42;
  }

  .methods-scroll-hint {
    display: none;
  }

  .section-title,
  .accreditation .section-title,
  .references .section-title {
    font-size: 1.75rem;
  }

  .section-subtitle,
  .accreditation .section-subtitle,
  .references .section-subtitle {
    font-size: 1.05rem;
  }

  .section-lead,
  .accreditation .section-lead,
  .references-intro,
  .contact-lead,
  .trust-copy {
    font-size: 0.95rem;
  }

  .glass-card {
    flex-basis: 100%;
    min-height: 0;
    border-radius: 20px;
    max-width: none;
  }

  .method-card {
    flex-basis: 100%;
    flex: 0 0 clamp(170px, 22svh, 220px);
    width: 100%;
    min-height: var(--methods-mobile-card-height);
    max-height: var(--methods-mobile-card-height);
    padding: 0.8rem;
    scroll-snap-align: start;
  }

  .method-icon {
    width: 46px;
    height: 46px;
    margin-bottom: 0.45rem;
  }

  .method-card h3 {
    margin-bottom: 0.35rem;
    font-size: 0.92rem;
    line-height: 1.2;
  }

  .method-card p {
    font-size: 0.84rem;
    line-height: 1.34;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .component-card,
  .contact-form {
    border-radius: var(--radius-md);
  }

  .references-logo-wall {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem 1.2rem;
    border-radius: 24px;
    padding: 1.8rem 1.4rem;
    align-items: center;
  }

  .references-logo-wall img {
    width: auto;
    max-width: 100%;
    height: 44px;
    max-height: 44px;
    object-fit: contain;
    object-position: center;
    justify-self: center;
    align-self: center;
  }

  .carousel-arrow {
    width: 2.1rem;
    min-width: 2.1rem;
    font-size: 1.3rem;
  }

  .footer-offices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
    justify-self: center;
    width: 100%;
  }

  .footer-office {
    text-align: center;
  }

  .footer-office h3 {
    font-size: 0.96rem;
    margin-bottom: 0.28rem;
  }

  .footer-office address {
    font-size: 0.8rem;
    line-height: 1.45;
    word-break: break-word;
  }

  .footer-logo {
    width: min(100%, 300px);
  }

  .footer-brand {
    justify-self: center;
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }

  .footer-links {
    width: 100%;
    text-align: center;
    justify-self: center;
  }

  .footer-legal-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.3rem 0.5rem;
    margin-bottom: 0.45rem;
  }

  .footer-legal-links a {
    font-size: 0.86rem;
    line-height: 1.2;
    text-align: center;
  }

  .footer-links h4 {
    margin-top: 0.55rem;
    margin-bottom: 0.42rem;
    text-align: center;
  }

  .footer-cert-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.3rem 0.7rem;
  }

  .footer-cert-links a {
    font-size: 0.84rem;
    line-height: 1.25;
    text-align: center;
  }
}

@keyframes methodsHintPulse {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(2px);
  }
}

@media (max-width: 500px) {
  .intro-text-block .eyebrow {
    font-size: 1.15rem;
  }

  .project-image {
    height: 190px;
  }

  .references-logo-wall {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.4rem 1rem;
    padding: 1.6rem 1.2rem;
  }

  .references-logo-wall img {
    height: 38px;
    max-height: 38px;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .fade-in-scroll {
    opacity: 1;
    transform: none;
  }
}
