/* ==========================================================================
   Layout: header + navigation, sections, footer, legal pages
   ========================================================================== */

/* ---------- Header + navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--porzellan);
  border-bottom: 1px solid var(--tinte-hair);
}

.site-header .container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1rem;
}

.site-header .lockup .wordmark { font-size: 1.75rem; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Small CTA in the header */
.btn--sm {
  padding: 0.5rem 1rem;
  font-size: 0.9375rem;
}

/* Burger button: opens the menu on small screens (only when JS runs) */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  color: var(--tinte);
  background: transparent;
  border: 1.5px solid var(--tinte-line);
  border-radius: 50%;
  cursor: pointer;
}
.js .menu-toggle { display: inline-flex; }
.menu-toggle:hover { border-color: var(--tinte); }

/* Three lines, drawn with one span + two pseudo-elements; turns into an X when open */
.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 1.1rem;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.menu-icon { position: relative; }
.menu-icon::before,
.menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
}
.menu-icon::before { top: -6px; }
.menu-icon::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-icon { background-color: transparent; }
.menu-toggle[aria-expanded="true"] .menu-icon::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon::after { transform: translateY(-6px) rotate(-45deg); }

/* Menu panel: drops down under the header, right-aligned */
.site-menu {
  display: none;
  position: absolute;
  top: calc(100% - 0.25rem);
  right: var(--gutter);
  width: min(18rem, calc(100vw - 2 * var(--gutter)));
  padding: 1.25rem 1.5rem 1.5rem;
  background: var(--white);
  border: 1.5px solid var(--tinte-hair);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(45, 42, 62, 0.1);
}
.site-menu.is-open { display: block; }

.site-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-menu a {
  display: inline-block;
  padding-block: 0.35rem;
  font-size: var(--fs-small);
  font-weight: 500;
  text-decoration: none;
  background: linear-gradient(90deg, var(--magenta), var(--petrol)) left bottom / 0 2px no-repeat;
  transition: background-size 0.2s ease;
}
.site-menu a:hover,
.site-menu a[aria-current="page"] { background-size: 100% 2px; }

/* Whole row is tappable (not just the word) and thumb-sized (48px).
   The underline stays under the word; an invisible layer stretches the tap area
   across the full panel width and lights up softly when pressed. */
.site-menu li {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 3rem;
}
.site-menu a { -webkit-tap-highlight-color: transparent; }
.site-menu a::before {
  content: "";
  position: absolute;
  inset: 0 -1.5rem;
  transition: background-color 0.15s ease;
}
.site-menu a:active::before { background: rgba(45, 42, 62, 0.06); }

/* Menu bar: smaller than body text so all items fit on one line */
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 1.25rem;
}

.site-nav a {
  display: block;
  padding-block: 0.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  background: linear-gradient(90deg, var(--magenta), var(--petrol)) left bottom / 0 2px no-repeat;
  transition: background-size 0.2s ease;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { background-size: 100% 2px; }

/* (11.11., Franzi) Home as a small house at the start of the bar (in the burger it is the word "Home").
   Plain line icon in Petrol, Magenta on hover. No asterisk: that belongs to the logo and headlines */
.site-nav .nav-home { display: flex; align-items: center; height: 100%; }
.nav-home-icon {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: var(--petrol);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.2s;
}
.nav-home:hover .nav-home-icon { stroke: var(--magenta); }

/* Below 1080px the bar would get cramped: the same menu moves behind the burger
   (only when JS runs, otherwise the bar stays visible and may wrap) */
@media (max-width: 1079px) {
  .js .site-nav { display: none; }
  .site-nav ul { flex-wrap: wrap; }
}
@media (min-width: 1080px) {
  .js .menu-toggle,
  .site-menu,
  .site-menu.is-open { display: none; }
}

@media (min-width: 860px) {
  .site-header .container { padding-block: 1.25rem; }
  .site-header .lockup .wordmark { font-size: 2rem; }
}

/* ---------- Sections ---------- */
.section {
  position: relative;
  padding-block: clamp(2.5rem, 5vw, 4.25rem);  /* (14.11., Franzi) same on every page and every section, hero included: 40px on phones */
  scroll-margin-top: 5rem;
}

/* Soft divider: gradient hairline that fades out towards both edges */
.section + .section::before,
.hero + .section::before,
.wt-intro + #culture-check::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100% - 2 * var(--gutter), var(--max-width));
  height: 1px;
  background: var(--shift-gradient);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  opacity: 0.35;
}

.section-head {
  max-width: 44rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: clamp(2rem, 3.5vw, 2.75rem);
}

.section h2 { font-size: var(--fs-h2); }
/* (08.11.) The Problem and My Offer as own pages: the former section headline is now the page h1, same size as before */
.section--page h1 { font-size: var(--fs-h2); }
.section--page h1.offer-title { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem); line-height: 1.15; }
/* Next-page link at the end of a page (The Problem → My Offer) */
.page-next { margin-top: 2.5rem; }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
}

.section-foot {
  margin-top: clamp(2rem, 3.5vw, 2.75rem);
  max-width: 44rem;
}

/* ---------- Footer: one quiet line ---------- */
.site-footer {
  padding-block: 1.5rem;
  border-top: 1px solid var(--tinte-hair);
  font-size: 0.9375rem;
  color: var(--tinte-soft);
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.5rem;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--tinte); text-decoration: underline; text-underline-offset: 4px; }
/* Phones: easier to tap (Mira, 27.10.), the line itself stays quiet */
@media (max-width: 640px) {
  .site-footer a { display: inline-block; padding-block: 0.6rem; }
  .footer-links { row-gap: 0; }
}

/* ---------- Legal pages ---------- */
.legal {
  padding-block: clamp(2.5rem, 5vw, 4.25rem);  /* (15.11.) same section spacing as every page */
}
.legal .container { max-width: 52rem; }
.legal h1 {
  font-size: var(--fs-h2);
  margin-bottom: 2rem;
}
.legal .placeholder + .placeholder { margin-top: 1rem; }
.legal h1 { margin-bottom: 0.75rem; }
.legal-jump { margin-bottom: 2.5rem; }
.legal-source { margin-top: 2rem; font-size: var(--fs-small); }
/* Two languages on one page: German block, then English block */
.legal-lang { scroll-margin-top: 6rem; }
.legal-lang + .legal-lang {
  margin-top: 4rem;
  padding-top: 3rem;
  background: linear-gradient(90deg, var(--magenta), var(--petrol)) top left / 100% 2px no-repeat;
}
.legal-lang > h2 {
  font-size: var(--fs-h3);
  margin-bottom: 1.5rem;
}
.legal-block { margin-top: 2rem; }
.legal-block h3 {
  font-size: var(--fs-body, 1.0625rem);
  margin-bottom: 0.5rem;
}
.legal address { font-style: normal; }
.legal-date { font-size: var(--fs-small); color: var(--tinte-muted); margin-bottom: 1.5rem; }
.legal-lang p + p { margin-top: 0.75rem; }
.legal-block h4 { font-size: var(--fs-body); margin: 1.75rem 0 0.5rem; }
.legal-block ul { margin: 0.75rem 0; padding-left: 1.25rem; }
.legal-block li + li { margin-top: 0.4rem; }
.legal-lang a { overflow-wrap: anywhere; }
.legal-block + .placeholder { margin-top: 2.5rem; }

/* Tight phone header: logo + CTA + menu must fit on one line */
@media (max-width: 480px) {
  .site-header .container { gap: 0.75rem; }
  .site-header .lockup .wordmark { font-size: 1.5rem; }
  .site-header .lockup .byline { font-size: 0.8125rem; }
  .header-actions { gap: 0.5rem; }
  .btn--sm { padding: 0.45rem 0.85rem; font-size: 0.875rem; }
  .menu-toggle { width: 2.5rem; height: 2.5rem; }
}

/* Soft transitions: sections ease in on scroll (js/reveal.js adds .is-visible) */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   Split layout (03.10.): one alignment rule for every page.
   Wide screens: headline left (stays in view while scrolling), text AND boxes share ONE column on the right.
   Small screens: headline on top, the same column below. No narrow text next to full-width boxes.
   ========================================================================== */
.split-head { margin-bottom: 1.5rem; }
.split-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
  max-width: 46rem;
}

@media (min-width: 1000px) {
  .split {
    display: grid;
    grid-template-columns: 20rem minmax(0, 1fr);
    column-gap: clamp(3rem, 6vw, 5rem);
    align-items: start;
  }
  .split-head {
    position: sticky;
    top: 7.5rem;
    margin-bottom: 0;
  }
  .split-body {
    grid-column: 2;
    max-width: none;
  }
}

/* Everything inside the column uses its full width and stacks, nothing sets its own narrower width */
.split-body .grid-3,
.split-body .grid-2 { grid-template-columns: 1fr; }
.split-body .prose,
.split-body .pull-quote,
.split-body .role-text,
.split-body .fact-list,
.split-body.closing,
.split-body.prose { max-width: none; }
.split-body.prose,
.split-body.closing { gap: 1.25rem; }
.split-body > * { margin-block: 0; }

/* About: station name above its story (the column is too narrow for name-left / story-right) */
.split-body .role { grid-template-columns: 1fr; gap: 0.75rem; }

/* My Offer inside the column */
.split-body .offer-proof,
.split-body .offer-blocks { margin-top: 1.5rem; }
.split-body .offer-proof {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.split-body .offer-proof > * { margin-block: 0; }
.split-body .stat-row { grid-template-columns: 1fr; gap: 1.25rem; }
.split-body .stat-item + .stat-item {
  padding-left: 0;
  margin-left: 0;
  border-left: 0;
}
.split-body .offer-end {
  align-items: flex-start;
  margin: 1.5rem 0 0;
  max-width: none;
  text-align: left;
}
@media (min-width: 700px) {
  .split-body .stat-item {
    display: grid;
    grid-template-columns: 16rem 1fr;
    gap: 1.5rem;
    align-items: baseline;
  }
}

/* (24.10.) One rule for every page: when headline and content stack (narrow screens),
   the space between the gradient line and the first content is always the same 2rem.
   Overrides the different local margins that had crept in (0 to 56px). */
@media (max-width: 999px) {
  .split > .split-head { margin-bottom: 2rem !important; }
  .split > .split-body > :first-child,
  .split > .split-body > :first-child > :first-child { margin-top: 0 !important; }
  .split > .split-head .gradient-line { margin-bottom: 0 !important; }
}

/* LinkedIn icon in the header (24.10.): clickable icon only, same round outline as the burger button */
.header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  color: var(--tinte);
  border: 1.5px solid var(--tinte-line);
  border-radius: 50%;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.header-icon svg { fill: currentColor; }
.header-icon:hover { border-color: var(--tinte); color: var(--petrol); }
@media (max-width: 480px) {
  .header-icon { width: 2.5rem; height: 2.5rem; }
  .header-icon svg { width: 16px; height: 16px; }
}
/* (24.10., v2) LinkedIn icon like the original: LinkedIn blue, filled circle, white "in". Turns Magenta on hover */
.header-icon {
  color: #FFFFFF;
  background: #0A66C2;
  border-color: #0A66C2;
}
.header-icon:hover,
.header-icon:focus-visible {
  color: #FFFFFF;
  background: var(--magenta);
  border-color: var(--magenta);
}

/* Very small phones (31.10.): everything in the header fits, long buttons may wrap instead of overflowing */
@media (max-width: 374px) {
  .header-actions { gap: 0.5rem; }  /* (15.11., Mira) a little more room between Let's talk, LinkedIn and menu */
  .nav-cta { padding-inline: 0.4rem; }  /* (15.11.) slimmer, so the extra room above still fits at 320px */
  main .btn { white-space: normal; text-align: center; }
}
/* Phones (06.11., Franzi): a long button ("Let's find out how I can support you*") wraps onto two centred lines
   instead of running past the screen edge. Buttons that fit stay on one line */
@media (max-width: 640px) {
  main .btn { white-space: normal; text-align: center; justify-content: center; max-width: 100%; }
  /* (15.11. tech check) inline-block instead of flex, so the asterisk stays right after the last word when the text wraps */
  main .btn { display: inline-block; line-height: 1.35; }
}

/* (15.11. tech check) Subheadings inside a page: 2rem between the gradient line and the first content, like every headline */
.split-body > .offer-question-head { margin-bottom: 0.5rem; }  /* + the column's 1.5rem gap = 2rem */

/* (15.11. tech check) No lonely words: headlines spread their lines evenly, running text avoids a single word on the last line */
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
.card-title-note { white-space: nowrap; }  /* "(Lufthansa Group)" stays together */
