/* eMedys umbrella and public introduction surfaces. Coordinated with the
   existing glass/landing design language: Inter for UI, Fraunces for display. */
@font-face{font-family:Inter;src:url('/static/fonts/InterVariable.woff2') format('woff2');font-weight:100 900;font-display:swap}
@font-face{font-family:Fraunces;src:url('/static/fonts/FrauncesVariable.woff2') format('woff2');font-weight:100 900;font-display:swap}

:root {
  --umb-bg: #f7f5ef;
  --lv-char: .76ch; /* German running text averages .76ch per character */
  --umb-ink: #1d2b2a;
  --umb-muted: #5b6b69;
  --umb-line: #e3dfd4;
  --umb-brand: #146b5f;
  --umb-brand-dark: #0f544a;
  --umb-accent: #c8892b;
  --umb-card: #ffffff;
  --umb-radius: 18px;
  --umb-max: 1160px;
  --umb-gap: clamp(20px, 4vw, 48px);
}

* { box-sizing: border-box; }

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

body.umb-page {
  margin: 0;
  background: var(--umb-bg);
  color: var(--umb-ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
}

.umb-wrap { max-width: var(--umb-max); margin: 0 auto; padding-inline: clamp(20px, 4vw, 40px); }

.umb-skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--umb-brand); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.umb-skip:focus { left: 0; }

/* Header */
.umb-header { background: rgba(247,245,239,.96); border-bottom: 1px solid var(--umb-line); position: sticky; top: 0; z-index: 20; }
.umb-header-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.umb-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--umb-ink); }
.umb-brand-mark { display: inline-flex; gap: 3px; align-items: flex-end; width: 30px; height: 30px; }
.umb-brand-mark i { width: 6px; background: var(--umb-brand); border-radius: 2px; }
.umb-brand-mark i:nth-child(1) { height: 14px; }
.umb-brand-mark i:nth-child(2) { height: 24px; }
.umb-brand-mark i:nth-child(3) { height: 30px; }
.umb-brand-name { display: flex; flex-direction: column; font-weight: 650; font-size: 17px; line-height: 1.1; }
.umb-brand-name small { font-size: 11.5px; color: var(--umb-muted); font-weight: 500; }

.umb-nav { display: flex; gap: 20px; margin-left: auto; }
.umb-nav a { color: var(--umb-ink); text-decoration: none; font-size: 14.5px; font-weight: 550; }
.umb-nav a:hover, .umb-nav a:focus-visible { color: var(--umb-brand); }
.umb-header .umb-button-small { flex-shrink: 0; }

/* Buttons */
.umb-button {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--umb-brand); color: #fff; text-decoration: none;
  padding: 12px 20px; border-radius: 10px; font-weight: 600; font-size: 15px;
  border: 1px solid var(--umb-brand);
}
.umb-button:hover { background: var(--umb-brand-dark); border-color: var(--umb-brand-dark); }
.umb-button-small { padding: 8px 14px; font-size: 14px; }
.umb-text-link { color: var(--umb-brand); font-weight: 600; text-decoration: none; }
.umb-text-link:hover, .umb-text-link:focus-visible { text-decoration: underline; }

/* Hero */
.umb-hero { padding-block: clamp(32px, 5vw, 64px); }
.umb-hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: var(--umb-gap); align-items: center; }
.umb-eyebrow { display: flex; align-items: center; gap: 8px; color: var(--umb-muted); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; font-weight: 600; margin: 0 0 14px; }
.umb-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--umb-accent); }
.umb-hero h1 { font-family: "Fraunces", Georgia, serif; font-size: clamp(38px, 6vw, 66px); line-height: 1.02; margin: 0 0 20px; letter-spacing: -.01em; font-weight: 600; }
.umb-hero h1 em { font-style: italic; color: var(--umb-brand); }
.umb-lead { font-size: clamp(16px, 2vw, 19px); color: var(--umb-muted); max-width: calc(56 * var(--lv-char)); margin: 0 0 26px; }
.umb-hero-art { margin: 0; position: relative; }
.umb-hero-art img { width: 100%; height: auto; border-radius: var(--umb-radius); display: block; box-shadow: 0 24px 60px -30px rgba(20,107,95,.35); }
.umb-hero-art figcaption { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; color: var(--umb-muted); font-size: 13px; }

/* The apex world is a bounded illustration. The shared Lernvisite intro keeps
   its existing .umb-hero composition and all public destinations remain links. */
.umb-world-hero { padding-block: 42px 34px; }
.umb-world-wrap { max-width: 1480px; }
.umb-world-heading { margin: 0 auto 27px; text-align: center; }
.umb-world-heading .umb-eyebrow { justify-content: center; margin-bottom: 13px; }
.umb-world-heading h1 {
  margin: 0 0 15px;
  font: 560 3.25rem/1.12 "Fraunces", Georgia, serif;
  hyphens: manual;
  text-wrap: balance;
}
.umb-world-heading h1 > * { white-space: nowrap; }
.umb-world-heading h1 em { color: var(--umb-brand); }
.umb-world-lead {
  max-width: calc(66 * var(--lv-char));
  margin: 0 auto;
  color: var(--umb-muted);
  font-size: 1rem;
  text-wrap: pretty;
  overflow-wrap: anywhere;
  hyphens: auto;
}
.umb-world {
  overflow: hidden;
  border: 1px solid #deded3;
  border-radius: 24px;
  background: #f5f3eb;
  box-shadow: 0 28px 66px -46px rgb(29 60 50 / .35);
}
.umb-world-stage {
  position: relative;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  background: linear-gradient(180deg, #eef2ec, #dfe9e2);
  touch-action: pan-y;
}
.umb-world-poster,
.umb-world-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.umb-world-poster { display: block; object-fit: contain; pointer-events: none; }
.umb-world-canvas { visibility: hidden; opacity: 0; pointer-events: none; }
.umb-world-canvas canvas { display: block; width: 100%; height: 100%; }
[data-world-state="ready"]:not([data-world-view="static"]) .umb-world-canvas { visibility: visible; opacity: 1; }
[data-world-state="ready"]:not([data-world-view="static"]) .umb-world-poster { visibility: hidden; }
.umb-world-controls {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.umb-world-controls:has(button:not([hidden])) { padding: 10px 16px; border-top: 1px solid #e9e6dd; }
.umb-world-control {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #708f81;
  border-radius: 9px;
  background: #fffefa;
  color: #274c40;
  font: 550 .8125rem/1.35 "Inter", sans-serif;
  cursor: pointer;
}
.umb-world-control[hidden] { display: none; }
.umb-world-control:hover { background: #ecf2eb; border-color: #708f81; }
.umb-world-control[aria-pressed="true"] { background: #e5eee5; border-color: #708f81; }
.umb-world-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 4px 8px;
  border-top: 1px solid #deded3;
  background: #fffefa;
}
.umb-world-link {
  --world-link-accent: #146b5f;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 100px;
  padding: 17px 19px;
  border-inline-end: 1px solid #e9e6dd;
  color: var(--umb-ink);
  text-decoration: none;
  transition: background-color 160ms ease;
}
.umb-world-link:last-child { border-inline-end: 0; }
.umb-world-link-lernvisite { --world-link-accent: #2a7f63; }
.umb-world-link-engineering { --world-link-accent: #3b5b9a; }
.umb-world-link-feriendialyse { --world-link-accent: #94551f; }
.umb-world-link-number {
  flex: 0 0 auto;
  align-self: flex-start;
  margin-top: 2px;
  color: var(--world-link-accent);
  font-size: .75rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.umb-world-link-copy { min-width: 0; display: grid; gap: 4px; }
.umb-world-link-copy strong { font-size: .9375rem; line-height: 1.35; font-weight: 650; }
.umb-world-link-copy > span { color: #56675f; font-size: .8125rem; line-height: 1.5; overflow-wrap: anywhere; hyphens: auto; }
.umb-world-link-arrow { margin-inline-start: auto; color: var(--world-link-accent); font-size: 1.125rem; }
.umb-world-link:hover,
.umb-world-link.is-active,
.umb-world-link[data-active="true"] { background: #edf2ea; }
.umb-world-link:hover strong { text-decoration: underline; text-underline-offset: .2em; }
.umb-world-link:focus-visible,
.umb-world-control:focus-visible { outline: 3px solid #064f47; outline-offset: -3px; }
.umb-world-map {
  position: absolute;
  z-index: 2;
  inset-inline-start: 0;
  top: 50%;
  width: 100%;
  aspect-ratio: 2 / 1;
  transform: translateY(-50%);
  pointer-events: none;
}
.umb-world-hotspot {
  position: absolute;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border-radius: 14px;
  color: #173f31;
  text-decoration: none;
  cursor: pointer;
  pointer-events: auto;
}
.umb-world-hotspot-emedys { left: 4%; top: 3%; width: 43%; height: 43%; }
.umb-world-hotspot-engineering { left: 54%; top: 3%; width: 43%; height: 43%; }
.umb-world-hotspot-lernvisite { left: 3%; top: 49%; width: 43%; height: 46%; }
.umb-world-hotspot-feriendialyse { left: 54%; top: 49%; width: 43%; height: 46%; }
.umb-world-hotspot > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  padding: 7px 12px;
  border: 1px solid #d8e0d6;
  border-radius: 20px;
  background: #fffefa;
  box-shadow: 0 3px 14px rgb(29 60 50 / .08);
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}
.umb-world-hotspot:hover > span { background: #e8f1e6; border-color: #728f7c; }
.umb-world-hotspot:focus-visible { outline: 3px solid #064f47; outline-offset: 4px; }
.umb-world-caption { display: flex; justify-content: space-between; align-items: baseline; gap: 12px 24px; margin: 16px 4px 0; }
.umb-world-caption p { margin: 0; color: var(--umb-muted); font-size: .8125rem; }
.umb-world-caption .umb-text-link { font-size: .8125rem; }
.umb-world-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

@media (max-width: 1080px) {
  .umb-world-link { padding: 16px 12px; gap: 9px; }
  .umb-world-link-number { display: none; }
  .umb-world-heading h1 { font-size: 2.75rem; }
}
@media (max-width: 760px) {
  .umb-world-hero { padding-block: 30px 27px; }
  .umb-world-heading { margin-bottom: 23px; }
  .umb-world-heading h1 { font-size: 2.25rem; }
  .umb-world-heading .umb-eyebrow { font-size: .6875rem; }
  .umb-world-lead { font-size: .9375rem; }
  .umb-world { border-radius: 18px; }
  .umb-world-links { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 4px; }
  .umb-world-link { min-height: 94px; padding: 15px 13px; }
  .umb-world-link:nth-child(2) { border-inline-end: 0; }
  .umb-world-link:nth-child(-n+2) { border-bottom: 1px solid #e9e6dd; }
  .umb-world-link-arrow { font-size: 1rem; }
  .umb-world-controls { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
  .umb-world-controls:has(button:not([hidden])) { padding: 10px; }
  .umb-world-control { min-width: 0; padding-inline: 8px; font-size: .75rem; }
  .umb-world-hotspot > span { gap: 5px; margin-top: 0; padding: 5px 8px; font-size: .6875rem; }
  .umb-world-caption { flex-wrap: wrap; gap: 7px; margin-top: 13px; }
}
@media (max-width: 380px) {
  .umb-world-heading h1 { font-size: 2rem; }
  .umb-world-link { padding: 13px 10px; gap: 5px; }
  .umb-world-link-copy strong { font-size: .875rem; }
  .umb-world-link-copy > span { font-size: .75rem; }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .umb-world { box-shadow: none; }
  .umb-world-control, .umb-world-links { background: #fffefa; }
  .umb-world-control { border-color: #547264; }
  .umb-world-hero[data-world] .umb-world-canvas,
  .umb-world-hero[data-world] .umb-world-poster { opacity: .12; }
  .umb-world-hotspot:focus-visible { background: #fffefa; }
}
@media (forced-colors: active) {
  .umb-world-stage { display: none; }
  .umb-world, .umb-world-link, .umb-world-links { border-color: CanvasText; }
  .umb-world-link, .umb-world-link-copy > span, .umb-world-link-number, .umb-world-link-arrow { color: LinkText; }
  .umb-world-link:focus-visible { outline-color: Highlight; }
}

/* Sections */
.umb-section { padding-block: clamp(24px, 3.5vw, 48px); border-top: 1px solid var(--umb-line); }
.umb-section-heading { max-width: calc(60 * var(--lv-char)); margin-bottom: 28px; }
.umb-section-heading h2, .umb-about h2, .umb-contact h2 { font-family: "Fraunces", Georgia, serif; font-size: clamp(26px, 4vw, 40px); line-height: 1.08; margin: 0 0 12px; font-weight: 600; }
.umb-section-heading p { color: var(--umb-muted); margin: 0; }

.umb-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.umb-card { background: var(--umb-card); border: 1px solid var(--umb-line); border-radius: var(--umb-radius); padding: 22px; overflow: hidden; }
.umb-card-art { display: block; width: calc(100% + 44px); margin: -22px -22px 16px; aspect-ratio: 16 / 9; height: auto; object-fit: cover; background: var(--umb-line); }
@media(prefers-reduced-transparency:reduce),(prefers-contrast:more){.umb-card-art{opacity:.12}}
@media(forced-colors:active){.umb-card-art{display:none}}
.umb-card:not(:has(.umb-card-art)) { padding-top: 22px; }
.umb-card h3 { font-size: 18px; margin: 0 0 8px; line-height: 1.25; }
.umb-card p { color: var(--umb-muted); margin: 0 0 14px; font-size: 14.5px; }
.umb-card-emedys { border-top: 3px solid #146b5f; }
.umb-card-lernvisite { border-top: 3px solid #2a7f63; }
.umb-card-engineering { border-top: 3px solid #3b5bdb; }
.umb-card-feriendialyse { border-top: 3px solid #c8782b; }
.umb-card-primary { grid-column: 1 / -1; }
.umb-card-primary .umb-card-art { aspect-ratio: 21 / 9; }
.umb-card-fact { margin: 0 0 14px; padding: 8px 12px; font-size: 13px; color: var(--umb-ink); background: #f0f5f2; border: 1px solid var(--umb-line); border-radius: 8px; }

/* About */
.umb-about { background: var(--umb-brand); color: #fff; padding-block: clamp(40px, 6vw, 72px); }
.umb-about-inner { display: grid; grid-template-columns: .8fr 1.2fr; gap: var(--umb-gap); }
.umb-about h2 { color: #fff; }
.umb-about .umb-eyebrow { color: rgba(255,255,255,.72); }
.umb-about .umb-dot { background: var(--umb-accent); }
.umb-about-copy p { color: rgba(255,255,255,.9); max-width: calc(68 * var(--lv-char)); }
.umb-about-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 20px; }
.umb-about .umb-button { background: #fff; color: var(--umb-brand); border-color: #fff; }
.umb-about .umb-text-link { color: #fff; }

/* Contact */
.umb-contact { padding-block: clamp(40px, 6vw, 72px); }
.umb-contact-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 20px; }
.umb-contact-email { color: var(--umb-muted); margin-top: 14px; }
.umb-contact-email a { color: var(--umb-brand); }
.umb-legal-line { max-width: var(--umb-max); margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px) 24px; font-size: 12.5px; color: var(--umb-muted); text-align: center; }
.umb-small { color: var(--umb-muted); font-size: 13.5px; max-width: calc(72 * var(--lv-char)); margin-top: 22px; }

/* Footer */
.umb-page .site-footer { margin-top: 0; }

/* Header: only "Lernvisite öffnen" is a button; the account control is a text link. */
.umb-page .lv-account:not([data-state=authenticated]) .lv-account-button { border: 0; background: transparent; border-radius: 0; }
.umb-page .lv-account:not([data-state=authenticated]) .lv-account-label { text-decoration: underline; font-weight: 500; }
.umb-page .lv-account:not([data-state=authenticated]) .lv-account-badge { display: none; }

:focus-visible { outline: 3px solid var(--umb-accent); outline-offset: 2px; }

@media (max-width: 900px) {
  .umb-hero-inner, .umb-about-inner { grid-template-columns: 1fr; }
  .umb-cards { grid-template-columns: 1fr 1fr; }
  .umb-nav { display: none; }
}
@media (max-width: 560px) {
  .umb-cards { grid-template-columns: 1fr; }
  .umb-header-inner { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
