/* ===========================================================
   TrinitySync – Website Stylesheet
   Schlicht, professionell, im Stil von Logo & App
   =========================================================== */

:root {
  /* Markenfarben (aus Logo) */
  --navy: #163a5b;
  --navy-deep: #0f293f;
  --green: #4ca64c;
  --green-deep: #2e7d4f;
  --blue: #2f7dc4;
  --blue-light: #4aa3df;

  /* Trinity-Farbcodierung (aus App) */
  --allergy: #e23b4d;
  --allergy-bg: #fdf0f1;
  --medication: #2e9e5b;
  --medication-bg: #eef8f1;
  --condition: #2f6fb0;
  --condition-bg: #eef4fb;

  /* Neutral */
  --ink: #1c2733;
  --muted: #5c6b7a;
  --line: #e4e9ef;
  --bg: #ffffff;
  --bg-soft: #f5f8fb;
  --bg-tint: #eef3f8;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 3px rgba(22, 58, 91, 0.06), 0 1px 2px rgba(22, 58, 91, 0.04);
  --shadow: 0 10px 30px rgba(22, 58, 91, 0.08);
  --shadow-lg: 0 24px 60px rgba(22, 58, 91, 0.12);
  --maxw: 1140px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Sprachsteuerung ---------- */
[data-lang-en] { display: none; }
body.lang-en [data-lang-de] { display: none; }
body.lang-en [data-lang-en] { display: inline; }
body.lang-en [data-lang-en].block { display: block; }
/* Blockelemente korrekt umschalten */
[data-lang-de].block { display: block; }
body.lang-en [data-lang-de].block { display: none; }

/* ---------- Header / Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav__brand { display: flex; align-items: center; gap: 10px; }
.nav__brand img { height: 36px; width: auto; }
.nav__brand:hover { text-decoration: none; }
.nav__links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
}
.nav__links a {
  color: var(--navy);
  font-weight: 500;
  font-size: 0.96rem;
  padding: 6px 0;
  position: relative;
  white-space: nowrap;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--green);
  transition: width 0.25s ease;
}
.nav__links a:hover { text-decoration: none; }
.nav__links a:hover::after,
.nav__links a.active::after { width: 100%; }
.nav__links a.active { color: var(--green-deep); }

.nav__right { display: flex; align-items: center; gap: 16px; }

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-soft);
}
.lang-toggle button {
  border: none;
  background: transparent;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font);
}
.lang-toggle button.active {
  background: var(--navy);
  color: #fff;
}

.nav__toggle {
  display: none;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--navy);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  font-family: var(--font);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-deep) 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(46, 125, 79, 0.28);
}
.btn--primary:hover { box-shadow: 0 12px 26px rgba(46, 125, 79, 0.36); }
.btn--secondary {
  background: #fff;
  color: var(--navy);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.btn--secondary:hover { border-color: var(--blue-light); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.5); }
.btn--ghost:hover { background: rgba(255,255,255,0.12); }

/* ---------- Sections ---------- */
section { padding: 84px 0; }
.section--soft { background: var(--bg-soft); }
.section--tint { background: var(--bg-tint); }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-deep);
  margin-bottom: 14px;
}
.section-head { max-width: 720px; margin: 0 auto 52px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }

h1, h2, h3 { color: var(--navy); line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.3rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.2rem; }
.lead { font-size: 1.15rem; color: var(--muted); }

/* ---------- Hero ---------- */
.hero--page { padding: 72px 0 64px; }
@media (max-width: 520px) {
  .hero--page { padding: 48px 0 36px; }
}

.hero {
  position: relative;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(74, 163, 223, 0.16), transparent 60%),
    radial-gradient(900px 500px at 0% 110%, rgba(76, 166, 76, 0.14), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, var(--bg-soft) 100%);
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero h1 { margin-bottom: 20px; }
.hero .lead { margin-bottom: 30px; max-width: 540px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__note { margin-top: 22px; font-size: 0.9rem; color: var(--muted); }
.hero__badges { display:flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.hero__badge {
  display:inline-flex; align-items:center; gap:8px;
  background:#fff; border:1px solid var(--line); border-radius:999px;
  padding:8px 14px; font-size:0.85rem; font-weight:600; color:var(--navy);
  box-shadow: var(--shadow-sm);
}

/* Trinity visual (Hero mock) */
.trinity-mock {
  background: #fff;
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  padding: 22px;
  border: 1px solid var(--line);
}
.trinity-mock__bar {
  display:flex; align-items:center; justify-content:space-between;
  padding: 6px 6px 16px; border-bottom: 1px solid var(--line); margin-bottom: 16px;
}
.trinity-mock__person { font-size: 0.85rem; color: var(--muted); }
.trinity-mock__person strong { display:block; color: var(--navy); font-size: 1.05rem; }
.bloodtype {
  background: var(--allergy-bg); color: var(--allergy);
  font-weight: 700; font-size: 0.8rem; padding: 5px 12px; border-radius: 999px;
}
.tri-cards { display:grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tri-card { border-radius: 14px; padding: 14px; border: 1px solid; }
.tri-card h4 { font-size: 0.95rem; margin-bottom: 6px; display:flex; align-items:center; gap:6px; }
.tri-card ul { list-style: none; font-size: 0.8rem; color: var(--ink); }
.tri-card li { padding: 4px 0; border-bottom: 1px dashed rgba(0,0,0,0.06); }
.tri-card li:last-child { border-bottom: none; }
.tri-card--a { background: var(--allergy-bg); border-color: #f6d2d6; }
.tri-card--a h4 { color: var(--allergy); }
.tri-card--m { background: var(--medication-bg); border-color: #cfead8; }
.tri-card--m h4 { color: var(--medication); }
.tri-card--c { background: var(--condition-bg); border-color: #d2e1f2; }
.tri-card--c h4 { color: var(--condition); }

/* ---------- Stat strip ---------- */
.stats { display:grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.stat { text-align:center; }
.stat__num { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; color: var(--navy); letter-spacing: -0.03em; }
.stat__num .accent { color: var(--green-deep); }
.stat__label { color: var(--muted); font-size: 0.98rem; margin-top: 4px; }

/* ---------- Trinity feature section ---------- */
.trinity-grid { display:grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pillar {
  background:#fff; border-radius: var(--radius); padding: 30px;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  border-top: 4px solid;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.pillar:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.pillar--a { border-top-color: var(--allergy); }
.pillar--m { border-top-color: var(--medication); }
.pillar--c { border-top-color: var(--condition); }
.pillar__icon {
  width: 52px; height: 52px; border-radius: 14px; display:grid; place-items:center;
  margin-bottom: 18px; font-size: 1.5rem;
}
.pillar--a .pillar__icon { background: var(--allergy-bg); color: var(--allergy); }
.pillar--m .pillar__icon { background: var(--medication-bg); color: var(--medication); }
.pillar--c .pillar__icon { background: var(--condition-bg); color: var(--condition); }
.pillar h3 { margin-bottom: 10px; }
.pillar--a h3 { color: var(--allergy); }
.pillar--m h3 { color: var(--medication-deep, var(--medication)); }
.pillar--c h3 { color: var(--condition); }
.pillar p { color: var(--muted); font-size: 0.98rem; }

/* ---------- Generic feature cards ---------- */
.cards { display:grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background:#fff; border:1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-sm);
}
.card__icon {
  width: 46px; height: 46px; border-radius: 12px; background: var(--bg-tint);
  display:grid; place-items:center; margin-bottom: 16px; font-size: 1.3rem;
}
.card h3 { margin-bottom: 8px; font-size: 1.1rem; }
.card p { color: var(--muted); font-size: 0.96rem; }

/* ---------- Steps (QR flow) ---------- */
.steps { display:grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.step { position: relative; padding-top: 8px; }
.step__num {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue) 0%, var(--navy) 100%);
  color:#fff; font-weight:700; display:grid; place-items:center; margin-bottom: 14px;
}
.step h3 { font-size: 1.05rem; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 0.94rem; }

/* ---------- Problem list ---------- */
.split { display:grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items:center; }
.checklist { list-style:none; }
.checklist li { display:flex; gap:12px; padding: 12px 0; border-bottom:1px solid var(--line); }
.checklist li:last-child { border-bottom:none; }
.checklist .ico { color: var(--green-deep); font-weight:700; flex:0 0 auto; }
.checklist .ico.warn { color: var(--allergy); }
.checklist strong { color: var(--navy); }
.checklist span { color: var(--muted); font-size: 0.96rem; }

.quote-block {
  background:#fff; border-left: 4px solid var(--green); border-radius: 12px;
  padding: 26px 28px; box-shadow: var(--shadow-sm); border:1px solid var(--line);
}
.quote-block p { font-size: 1.05rem; color: var(--ink); font-style: italic; }
.quote-block cite { display:block; margin-top:12px; color: var(--muted); font-style: normal; font-size: 0.9rem; }

/* ---------- Team ---------- */
.team-grid { display:grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.member { text-align:center; }
.member__avatar {
  width: 84px; height: 84px; margin: 0 auto 14px; border-radius: 50%;
  display:grid; place-items:center; font-size: 1.6rem; font-weight: 700; color:#fff;
  background: linear-gradient(135deg, var(--blue-light), var(--green));
}
.member h3 { font-size: 1.02rem; }
.member p { color: var(--muted); font-size: 0.88rem; }

/* ---------- Contact ---------- */
.contact-grid { display:grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items:start; }
.form-card {
  background:#fff; border:1px solid var(--line); border-radius: var(--radius);
  padding: 34px; box-shadow: var(--shadow);
}
.field { margin-bottom: 18px; }
.field label { display:block; font-weight:600; font-size:0.9rem; color: var(--navy); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width:100%; padding: 12px 14px; border:1px solid var(--line); border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 0.96rem; color: var(--ink); background: var(--bg-soft);
  transition: border 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline:none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(76,166,76,0.15); background:#fff;
}
.field textarea { min-height: 120px; resize: vertical; }
.contact-info { display:flex; flex-direction:column; gap: 22px; }
.contact-info .info-row { display:flex; gap:14px; align-items:flex-start; }
.contact-info .info-row .ico { font-size:1.2rem; }
.contact-info h3 { margin-bottom: 4px; font-size: 1.02rem; }
.contact-info p { color: var(--muted); font-size: 0.96rem; }
.form-success {
  display:none; background: var(--medication-bg); border:1px solid #cfead8;
  color: var(--green-deep); padding: 14px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; font-weight:600;
}
.form-error {
  display:none; background: var(--allergy-bg); border:1px solid #f6d2d6;
  color: var(--allergy); padding: 14px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; font-weight:600;
}

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  border-radius: 24px; padding: 56px; text-align:center; color:#fff;
  position: relative; overflow:hidden;
}
.cta-banner::before {
  content:""; position:absolute; inset:0;
  background: radial-gradient(600px 300px at 90% -20%, rgba(74,163,223,0.35), transparent 60%),
              radial-gradient(500px 300px at 0% 120%, rgba(76,166,76,0.3), transparent 60%);
}
.cta-banner > * { position: relative; }
.cta-banner h2 { color:#fff; margin-bottom: 14px; }
.cta-banner p { color: rgba(255,255,255,0.85); max-width: 560px; margin: 0 auto 28px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,0.8); padding: 56px 0 28px; }
.footer-grid { display:grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 36px; }
.site-footer img { height: 34px; margin-bottom: 14px; filter: brightness(0) invert(1); opacity: 0.95; }
.site-footer h4 { color:#fff; font-size: 0.95rem; margin-bottom: 14px; letter-spacing: 0.02em; }
.site-footer ul { list-style:none; }
.site-footer ul li { padding: 5px 0; }
.site-footer a { color: rgba(255,255,255,0.78); font-size: 0.94rem; }
.site-footer a:hover { color:#fff; }
.site-footer p { font-size: 0.92rem; line-height: 1.7; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12); padding-top: 22px;
  display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap;
  font-size: 0.86rem; color: rgba(255,255,255,0.6);
}

.disclaimer {
  background: var(--bg-tint); border:1px dashed var(--blue-light); border-radius: var(--radius-sm);
  padding: 16px 20px; font-size: 0.88rem; color: var(--muted); max-width: 820px; margin: 0 auto;
}
.disclaimer strong { color: var(--navy); }

/* ---------- Reveal animation ---------- */
/* Standard: sichtbar (Fallback ohne JS / wenn Observer nicht greift). */
.reveal { opacity: 1; transform: none; }
/* Nur wenn JS aktiv ist, starten Elemente versteckt und blenden beim Scrollen ein. */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero__grid, .split, .contact-grid { grid-template-columns: 1fr; }
  .trinity-grid, .cards, .stats { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-banner { padding: 40px 24px; }
  .hero__grid { gap: 36px; }
  .hero__grid > div:last-child { order: -1; }

  .nav__links {
    position: absolute; top: 72px; left: 0; right: 0;
    background:#fff; border-bottom:1px solid var(--line);
    flex-direction: column; align-items: flex-start; gap: 0;
    padding: 8px 24px 18px; box-shadow: var(--shadow);
    display: none;
  }
  .nav__links.open { display: flex; }
  .nav__links li { width: 100%; }
  .nav__links a { display:block; padding: 12px 0; width: 100%; border-bottom: 1px solid var(--bg-soft); }
  .nav__toggle { display: block; }
}
@media (max-width: 520px) {
  .steps, .team-grid { grid-template-columns: 1fr; }
  section { padding: 60px 0; }

  /* Stack the 3-column hero mock cards */
  .tri-cards { grid-template-columns: 1fr; }
  .trinity-mock { padding: 14px; }

  /* Stack CTA buttons to full width */
  .hero__cta { flex-direction: column; }
  .hero__cta .btn { width: 100%; justify-content: center; }

  .hero__badges { gap: 6px; }
}

/* Fine-tuning for very small phones (≤400px) */
@media (max-width: 400px) {
  .container { padding: 0 16px; }
  .nav__brand img { height: 28px; }
  .lang-toggle button { padding: 6px 10px; font-size: 0.8rem; }
  .hero__badge { font-size: 0.76rem; padding: 6px 10px; }
  .cta-banner { padding: 32px 16px; }
  .form-card { padding: 22px 18px; }
  h1 { font-size: clamp(1.8rem, 7vw, 2.4rem); }
}
