/* jaycloud.at – gemeinsames Stylesheet. Keine externen Schriften oder Skripte (Datenschutz). */

:root {
  --bg: #f6f7f5;
  --bg-soft: #ffffff;
  --surface: #ffffff;
  --border: #dfe3df;
  --text: #17201b;
  --muted: #5b675f;
  --accent: #23854b;
  --accent-soft: #e3f2e8;
  --amber: #c27c00;
  --amber-soft: #fbf0d9;
  --code-bg: #eef1ee;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 8px 24px rgba(0, 0, 0, .06);
  --radius: 14px;
  --max: 980px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11171d;
    --bg-soft: #151d24;
    --surface: #1a232b;
    --border: #2a353f;
    --text: #e8ece9;
    --muted: #9aa7a0;
    --accent: #3fb36f;
    --accent-soft: #1d3327;
    --amber: #f2b42c;
    --amber-soft: #3a3020;
    --code-bg: #0d1217;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

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

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 2.8rem); letter-spacing: -.02em; }
h2 { font-size: 1.55rem; margin-top: 2.2em; letter-spacing: -.01em; }
h3 { font-size: 1.15rem; margin-top: 1.4em; }
p { margin: 0 0 1em; }

code {
  font: .88em/1.4 ui-monospace, "Cascadia Code", Consolas, monospace;
  background: var(--code-bg);
  padding: .1em .35em;
  border-radius: 5px;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  font: 14px/1.5 ui-monospace, "Cascadia Code", Consolas, monospace;
}
pre code { background: none; padding: 0; font-size: inherit; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* Kopf- und Fußzeile */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 60px; flex-wrap: wrap;
}
.brand { font-weight: 700; color: var(--text); text-decoration: none; font-size: 1.1rem; }
.brand span { color: var(--accent); }
.site-nav { display: flex; gap: 4px 18px; flex-wrap: wrap; font-size: .95rem; }
.site-nav a { color: var(--muted); text-decoration: none; padding: 6px 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }
.site-nav { align-items: center; }
.site-nav a.login-btn {
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px;
  font-size: .85rem; color: var(--muted); margin-left: 6px;
}
.site-nav a.login-btn:hover { border-color: var(--accent); color: var(--accent); }
.site-nav { margin-left: auto; }

/* Sprachumschalter DE | EN – reine Links auf die Gegenseite (/… ↔ /en/…) */
.lang-switch {
  display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 2px;
  font-size: .8rem; font-weight: 600; line-height: 1;
}
.lang-switch a {
  color: var(--muted); text-decoration: none; padding: 5px 9px; border-radius: 999px;
}
.lang-switch a:hover { color: var(--accent); }
.lang-switch a[aria-current] { background: var(--accent-soft); color: var(--accent); }

/* Dropdown „Projekte“ – ohne JavaScript über <details> (CSP: script-src 'none') */
.nav-drop { position: relative; }
.nav-drop summary {
  list-style: none; cursor: pointer; color: var(--muted); padding: 6px 0;
  display: flex; align-items: center; gap: 4px;
}
.nav-drop summary::-webkit-details-marker { display: none; }
.nav-drop summary::after {
  content: ""; width: 6px; height: 6px; margin: -3px 2px 0 4px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform .15s ease;
}
.nav-drop[open] summary::after { transform: rotate(-135deg); margin-top: 3px; }
.nav-drop summary:hover, .nav-drop[open] summary, .nav-drop.current summary { color: var(--text); }
.nav-drop.current summary { box-shadow: inset 0 -2px 0 var(--accent); }
.nav-drop-menu {
  position: absolute; top: calc(100% + 8px); left: -12px; z-index: 20;
  width: 300px; max-width: calc(100vw - 32px);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 6px; display: grid; gap: 2px;
}
.site-nav .nav-drop-menu a {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px;
  color: var(--text); box-shadow: none;
}
.site-nav .nav-drop-menu a:hover { background: var(--accent-soft); }
.site-nav .nav-drop-menu a[aria-current="page"] { background: var(--accent-soft); box-shadow: none; }
.nav-drop-menu img { width: 36px; height: 36px; border-radius: 9px; flex: none; }
.nav-drop-menu b { display: block; font-weight: 600; line-height: 1.3; }
.nav-drop-menu small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.3; }
.site-nav .nav-drop-menu a.sub { margin-left: 22px; }
.nav-drop-menu a.sub img { width: 28px; height: 28px; border-radius: 7px; }

.site-footer {
  margin-top: 72px; border-top: 1px solid var(--border);
  color: var(--muted); font-size: .9rem; padding: 28px 0 40px;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-footer a { color: var(--muted); }

/* Startseite */
.hero { padding: 64px 0 24px; display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center; }
.avatar {
  width: 168px; height: 168px; border-radius: 50%; object-fit: cover;
  border: 4px solid var(--surface); box-shadow: 0 0 0 2px var(--accent), var(--shadow);
}
.hero .lead { font-size: 1.2rem; color: var(--muted); max-width: 36em; }
.eyebrow { color: var(--accent); font-weight: 600; font-size: .95rem; margin-bottom: .4em; }

@media (max-width: 640px) {
  .hero { grid-template-columns: 1fr; text-align: center; gap: 24px; padding-top: 40px; }
  .avatar { margin: 0 auto; width: 140px; height: 140px; }
  .hero .lead { margin-left: auto; margin-right: auto; }
}

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column;
  color: var(--text); text-decoration: none; transition: transform .15s ease, border-color .15s ease;
}
a.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.card-head img { width: 52px; height: 52px; border-radius: 12px; }
.card-head h3 { margin: 0; }
.card-ico {
  width: 52px; height: 52px; border-radius: 12px; flex: none;
  display: grid; place-items: center; font-size: 1.7rem; background: var(--accent-soft);
}
details summary { cursor: pointer; color: var(--accent); }
details pre { margin-top: 10px; }
.card-head small { color: var(--muted); display: block; font-size: .85rem; }
.card p { color: var(--muted); flex: 1; }
.card .more { color: var(--accent); font-weight: 600; }
.card.card-group { padding: 0; overflow: hidden; }
.card-group:has(a:hover) { border-color: var(--accent); }
.card-group a { color: var(--text); text-decoration: none; }
.card-main { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.card-sub {
  display: flex; align-items: center; gap: 12px; padding: 14px 24px;
  border-top: 1px solid var(--border); background: var(--accent-soft);
}
.card-sub img { width: 36px; height: 36px; border-radius: 8px; flex: none; }
.card-sub span:not(.more) { flex: 1; }
.card-sub b { display: block; }
.card-sub small { color: var(--muted); display: block; font-size: .85rem; }
.card-main:hover h3, .card-sub:hover b { color: var(--accent); }

.notice {
  background: var(--amber-soft); border-left: 4px solid var(--amber);
  border-radius: 10px; padding: 18px 20px; margin: 28px 0;
}
.notice strong:first-child { display: block; margin-bottom: 4px; }
.notice p:last-child { margin-bottom: 0; }

/* Projektseiten */
.project-hero { padding: 56px 0 8px; }
.project-hero .tag {
  display: inline-block; background: var(--accent-soft); color: var(--accent);
  font-weight: 600; font-size: .85rem; padding: 4px 12px; border-radius: 999px; margin-bottom: 14px;
}
.project-hero .lead { font-size: 1.2rem; color: var(--muted); max-width: 40em; }
.project-title { display: flex; align-items: center; gap: 18px; }
.project-title img { width: 72px; height: 72px; border-radius: 16px; }
.project-title h1 { margin: 0; }
.project-title + .lead, .steps + p { margin-top: 16px; }

.buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 8px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; font-weight: 600; text-decoration: none;
  border: 1px solid var(--border); color: var(--text); background: var(--surface);
}
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn:hover { border-color: var(--accent); }

.shot { border-radius: 12px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.shot-main { margin: 32px 0 8px; }
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 16px; }
.shots.phones { grid-template-columns: repeat(3, 1fr); align-items: start; }
@media (max-width: 640px) { .shots.phones { grid-template-columns: repeat(2, 1fr); } }
.shots.phones .shot { border-radius: 18px; }
figure { margin: 0; }

/* Hinweis auf ein zugehöriges Projekt (Order Manager ↔ Client) */
.related {
  display: flex; align-items: center; gap: 20px; margin-top: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.related > img { width: 64px; height: 64px; border-radius: 14px; flex: none; }
.related h3 { margin: 0 0 4px; }
.related p { color: var(--muted); margin: 0 0 8px; }
.related p:last-child { margin-bottom: 0; }
@media (max-width: 560px) { .related { flex-direction: column; align-items: flex-start; } }
figcaption { color: var(--muted); font-size: .9rem; margin-top: 8px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 16px; }
.feature {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px;
}
.feature .ico { font-size: 1.6rem; line-height: 1; margin-bottom: 10px; }
.feature h3 { margin: 0 0 6px; font-size: 1.05rem; }
.feature p { color: var(--muted); margin: 0; font-size: .95rem; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 12px; }
.steps li {
  counter-increment: step; position: relative; padding: 16px 18px 16px 64px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.steps li::before {
  content: counter(step); position: absolute; left: 18px; top: 14px;
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-weight: 700;
}

.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.flow > div {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 14px; text-align: center; position: relative;
}
.flow .big { font-size: 2rem; line-height: 1; margin-bottom: 8px; }
.flow b { display: block; }
.flow small { color: var(--muted); }
@media (max-width: 720px) { .flow { grid-template-columns: repeat(2, 1fr); } }

table { border-collapse: collapse; width: 100%; margin: 12px 0 20px; font-size: .95rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.table-scroll { overflow-x: auto; }

/* Rechtliches */
.legal { max-width: 46em; }
.legal h2 { font-size: 1.3rem; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 8px; }
.toc a {
  font-size: .9rem; text-decoration: none; padding: 6px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}

/* Handy */
@media (max-width: 640px) {
  html { scroll-padding-top: 110px; }
  /* Kopfzeile: Logo oben, Navigation als eigene Zeile darunter */
  .site-header .wrap { position: relative; gap: 2px; min-height: 0; padding-top: 10px; padding-bottom: 4px; }
  .site-nav { width: 100%; justify-content: space-between; gap: 4px 10px; font-size: .92rem; }
  .site-nav a.login-btn { margin-left: 0; padding: 3px 10px; }
  /* Sprachumschalter rechts neben dem Logo statt in der Navigationszeile */
  .lang-switch { position: absolute; top: 8px; right: 16px; }
  /* Menü über die ganze Breite statt am Eintrag „Projekte“ */
  .nav-drop { position: static; }
  .nav-drop-menu { top: calc(100% + 4px); left: 12px; right: 12px; width: auto; max-width: none; }
  .site-nav .nav-drop-menu a { padding: 10px; }

  h2 { font-size: 1.35rem; margin-top: 1.8em; }
  .project-hero { padding-top: 32px; }
  .project-hero .lead, .hero .lead { font-size: 1.08rem; }
  .project-title { gap: 14px; }
  .project-title img { width: 56px; height: 56px; border-radius: 13px; }
  .buttons .btn { flex: 1 1 auto; justify-content: center; }
  .shot-main { margin-top: 24px; }
  .card { padding: 20px; }
  .site-footer { margin-top: 48px; }
}
