/* ==========================================================================
   Page composition — homepage and section-specific blocks
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero
   Full-bleed photograph under a heavy navy gradient. The original used
   background-attachment: fixed, which iOS ignores entirely and which forces a
   repaint on every scroll frame elsewhere — so this uses a real <img> in a
   <picture>, giving us responsive sources, WebP, and a priority fetch.
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  /* Sized so the stat band below is just visible on a 900px laptop — a hero
     that exactly fills the viewport gives no signal there is more to read. */
  min-height: min(76vh, 40rem);
  padding-block: calc(var(--space-20) + 3rem) var(--space-12);
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

/* Two-stop navy wash. Dense enough that white headline text clears AA
   comfortably regardless of what the photograph is doing underneath. */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    var(--overlay-top) 0%,
    var(--overlay-bottom) 62%,
    var(--ink) 100%
  );
}

.hero__inner { position: relative; }

.hero__title {
  font-size: var(--text-5xl);
  color: var(--paper);
  max-width: 16ch;
}
/* The full stop is set in gold — a single punctuation mark carrying the
   accent reads as deliberate where a gold word would read as decoration. */
.hero__title em {
  font-style: normal;
  color: var(--accent);
}

.hero__lede {
  margin-top: var(--space-6);
  max-width: 58ch;
  font-size: var(--text-lg);
  line-height: var(--leading-normal);
  color: rgba(250, 248, 243, 0.82);
}

.hero__actions { margin-top: var(--space-8); }

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-8);
  margin-top: var(--space-10);
  padding-top: var(--space-6);
  border-top: 1px solid var(--rule-ink);
}
.hero__badges li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: rgba(250, 248, 243, 0.85);
}
.hero__badges svg {
  width: 1rem;
  height: 1rem;
  color: var(--accent);
  flex-shrink: 0;
}

@media (max-width: 40rem) {
  .hero { min-height: auto; padding-block: calc(var(--space-24) + 3rem) var(--space-16); }
  .hero__title { max-width: none; }
  .hero__badges { gap: var(--space-3) var(--space-5); margin-top: var(--space-10); }
}

/* --------------------------------------------------------------------------
   Section heading block
   -------------------------------------------------------------------------- */

.section-head { max-width: 52ch; }
.section-head .lede { margin-top: var(--space-5); }

/* --------------------------------------------------------------------------
   Feature list — the "what is Ausbildung" and "why us" items.
   A gold rule on the left rather than an icon; icons at this size add noise.
   -------------------------------------------------------------------------- */

.feature {
  padding-left: var(--space-6);
  border-left: 2px solid var(--accent);
}
.feature__title {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: var(--tracking-snug);
  line-height: var(--leading-snug);
}
.feature__body {
  margin-top: var(--space-2);
  color: var(--ink-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  max-width: 52ch;
}
.section--ink .feature__body { color: rgba(250, 248, 243, 0.72); }

/* --------------------------------------------------------------------------
   Sector grid
   Deliberately not an even 3-up card row. Two columns on tablet, four on
   desktop, with hairline rules rather than boxes — closer to an index than
   a set of tiles.
   -------------------------------------------------------------------------- */

.sector-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--rule);
  border-block: 1px solid var(--rule);
}
@media (min-width: 34rem) { .sector-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .sector-grid { grid-template-columns: repeat(4, 1fr); } }

.sector {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6) var(--space-5);
  background: var(--paper-warm);
  transition: background-color var(--duration-base) var(--ease);
}
.sector:hover { background: var(--white); }

/* Gold rule that wipes in across the top on hover. */
.sector::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-slow) var(--ease);
}
.sector:hover::before { transform: scaleX(1); }

.sector__num {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-eyebrow);
  color: var(--ink-faint);
}
.sector__title {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  letter-spacing: var(--tracking-snug);
  line-height: var(--leading-snug);
}
.sector__body {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  line-height: var(--leading-normal);
  flex: 1;
}
.sector__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.tag {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  padding: 0.3em 0.6em;
  border-radius: var(--radius-sm);
  background: rgba(11, 43, 60, 0.05);
  color: var(--ink-muted);
  white-space: nowrap;
}
.tag--accent {
  background: var(--accent-wash);
  color: var(--accent-ink);
}

/* --------------------------------------------------------------------------
   Data table on navy
   -------------------------------------------------------------------------- */

.data-table--ink {
  background: transparent;
  min-width: 34rem;
}
.data-table--ink thead th {
  color: rgba(250, 248, 243, 0.6);
  border-bottom-color: var(--rule-ink);
}
.data-table--ink td {
  border-bottom-color: var(--rule-ink);
  color: var(--paper);
}
.data-table--ink tbody tr:hover { background: rgba(250, 248, 243, 0.04); }
.data-table--ink .bar__track { background: rgba(250, 248, 243, 0.12); }
.data-table--ink .bar__fill { background: var(--accent); }

/* The bars use width rather than a transform scale here, because each row
   encodes a different value and a shared scaleX would distort them. */
.data-table .bar__fill {
  transform: none;
  transition: none;
}
.data-table .bar { min-width: 6rem; }

/* Defaults to the light context and inverts inside a dark section. It was
   originally written cream-on-navy only, which made it invisible the first time
   it was reused on a cream page. */
.source-note {
  margin-top: var(--space-6);
  font-size: var(--text-xs);
  color: var(--ink-muted);
  max-width: 60ch;
  line-height: var(--leading-normal);
}
.is-dark .source-note { color: rgba(250, 248, 243, 0.55); }

/* --------------------------------------------------------------------------
   Callout — the blocked-account correction
   -------------------------------------------------------------------------- */

.callout {
  padding: var(--space-8);
  border-radius: var(--radius-lg);
  background: rgba(250, 248, 243, 0.06);
  box-shadow: inset 0 0 0 1px var(--rule-ink);
  border-left: 2px solid var(--accent);
}
.callout__title {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--paper);
  letter-spacing: var(--tracking-snug);
  line-height: var(--leading-snug);
}
.callout__body {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: rgba(250, 248, 243, 0.78);
}
.callout__source {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--rule-ink);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  color: rgba(250, 248, 243, 0.5);
  line-height: var(--leading-normal);
}

/* --------------------------------------------------------------------------
   Contact details
   -------------------------------------------------------------------------- */

.contact-row {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  font-size: var(--text-sm);
}
.contact-row__icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  background: var(--accent-wash);
  color: var(--accent-ink);
}
.contact-row__icon svg { width: 1.125rem; height: 1.125rem; }
.contact-row__label {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow);
  color: var(--ink-faint);
  margin-bottom: var(--space-1);
}
.contact-row a { color: var(--ink); border-bottom: 1px solid var(--accent); }
.contact-row a:hover { color: var(--accent-ink); }

/* The homepage hero already sits under the fixed header, so the global
   top padding would double up. */
.is-home .site-main { padding-top: 0; }

/* --------------------------------------------------------------------------
   Interior page heading — sits below the fixed header, so it needs clearance
   the homepage hero does not.
   -------------------------------------------------------------------------- */

.page-head { padding-top: calc(var(--space-16) + 3rem); }

/* Ticked list used on sector pages. */
.ticked {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--ink-muted);
}
.ticked svg {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin-top: 0.28em;
  color: var(--accent);
}
.section--ink .ticked { color: rgba(250, 248, 243, 0.78); }

.data-table__sector a { color: var(--ink); border-bottom: 1px solid var(--accent); }
.data-table__sector a:hover { color: var(--accent-ink); }
.sector__title a { color: inherit; }
.sector__title a:hover { color: var(--accent-ink); }
