/* Toloui – Projektübersicht. Helles Theme, Stil angelehnt an Habitia (Indigo/Glas) und Shoply (Grün/Gelb/Federn). */
:root {
  --bg: #f8fafc;
  --surface: rgba(255, 255, 255, .72);
  --surface-solid: #fff;
  --border: rgba(15, 23, 42, .08);
  --text: #0f172a;
  --text-2: #475569;
  --accent: #6366f1;
  --violet: #8b5cf6;
  --green: #2fa36b;
  --amber: #f2b705;
  --radius: 28px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.3, 1.5, .5, 1);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font); background: var(--bg); color: var(--text);
  line-height: 1.5; -webkit-font-smoothing: antialiased;
  overflow: hidden; /* Desktop: eine Seite, kein Scrollen */
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

.skip { position: fixed; left: 12px; top: -60px; z-index: 200; padding: .6rem 1rem; border-radius: 12px; background: var(--text); color: #fff; font-weight: 600; transition: top .3s var(--ease); }
.skip:focus { top: 12px; }

/* Hintergrund: Aurora (Habitia) + Blobs in Shoply-Farben, feines Korn */
.aurora { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.aurora i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .32; animation: drift 24s ease-in-out infinite alternate; will-change: transform; }
.aurora i:nth-child(1) { width: 52vmax; height: 52vmax; background: #6366f1; top: -24vmax; left: -16vmax; }
.aurora i:nth-child(2) { width: 42vmax; height: 42vmax; background: #8fd3a8; bottom: -22vmax; left: 18vw; animation-delay: -7s; animation-duration: 28s; opacity: .4; }
.aurora i:nth-child(3) { width: 38vmax; height: 38vmax; background: #ffe08a; top: -10vmax; right: -14vmax; animation-delay: -13s; opacity: .38; }
.aurora i:nth-child(4) { width: 30vmax; height: 30vmax; background: #c4b5fd; bottom: -14vmax; right: -6vmax; animation-delay: -19s; animation-duration: 20s; opacity: .3; }
.grain { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* Raster der Seite: Nav / Intro / Karten / Fuß, alles in 100svh */
.page {
  height: 100svh; width: min(1240px, 100% - 48px); margin-inline: auto;
  display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: clamp(.8rem, 2.4vh, 1.8rem); padding-block: 14px clamp(10px, 2vh, 18px);
}

/* Nav-Pille (Glas) */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: .45rem .55rem .45rem .55rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 10px 40px -18px rgba(15, 23, 42, .25);
  animation: dropIn .9s var(--ease) both;
}
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; padding-right: .6rem; border-radius: 999px; }
.brand-mark { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; color: #fff; font-size: 1.15rem;
  background: linear-gradient(135deg, var(--accent), var(--violet) 55%, var(--green)); background-size: 200% 200%;
  animation: shine 6s ease-in-out infinite alternate; transition: transform .5s var(--spring); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.08); }
.status { display: inline-flex; align-items: center; gap: .55rem; padding: .5rem 1rem; border-radius: 999px; background: #ddeee3; color: #0e3a22; font-weight: 600; font-size: .86rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: pulse 2s infinite; }

/* Intro */
.intro { text-align: center; }
.eyebrow { display: inline-block; font-weight: 700; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: #4f46e5; margin-bottom: .5rem; }
h1 { font-size: clamp(2rem, min(5vw, 7.5vh), 4.2rem); font-weight: 800; line-height: 1.05; letter-spacing: -.035em; margin-bottom: .6rem; }
h1 em { font-style: normal; }
h1 em, h1 em .w > span {
  background: linear-gradient(100deg, var(--accent), var(--violet) 40%, var(--green) 75%, #b45309);
  background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 6s ease-in-out infinite alternate;
}
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.split .w > span { display: inline-block; transform: translateY(110%) rotate(4deg); animation: wordUp 1s var(--ease) forwards; animation-delay: calc(var(--i) * 70ms + 150ms); }
h1 em .w > span { animation: wordUp 1s var(--ease) forwards, shine 6s ease-in-out infinite alternate; animation-delay: calc(var(--i) * 70ms + 150ms), 0s; }
.lead { font-size: clamp(.98rem, 1.4vw, 1.15rem); color: var(--text-2); max-width: 38rem; margin-inline: auto; }

.reveal { opacity: 0; transform: translateY(18px); animation: rise .9s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 110ms + 100ms); }

/* Karten */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.9rem, 1.6vw, 1.4rem); min-height: 0; }
.card {
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%; --lift: 0px;
  position: relative; isolation: isolate; display: flex; flex-direction: column; gap: clamp(.6rem, 1.6vh, 1rem);
  min-height: 0; max-height: 420px; align-self: center; height: 100%;
  padding: clamp(1.1rem, 2.4vh, 1.6rem); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .66));
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 24px 60px -30px rgba(15, 23, 42, .28);
  backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  transform: perspective(1200px) translateY(var(--lift)) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .6s var(--ease), box-shadow .5s var(--ease);
  opacity: 0; animation: cardIn 1s var(--ease) forwards; animation-delay: calc(var(--i) * 110ms + 520ms);
  overflow: hidden;
}
/* Projektfarben und Reihenfolge (statt Inline-Styles, damit eine strikte CSP greift) */
.d3 { --i: 3; }
.card--habitia { --i: 0; --c1: #6366f1; --c2: #8b5cf6; --b1: #4f46e5; --b2: #7c3aed; --tint: #eef2ff; }
.card--shoply  { --i: 1; --c1: #1b5e3b; --c2: #2fa36b; --b1: #1b5e3b; --b2: #1f7a4d; --tint: #ddeee3; }
.card--fall    { --i: 2; --c1: #7c3aed; --c2: #22d3ee; --b1: #6d28d9; --b2: #0e7490; --tint: #f3e8ff; }
.card--hermes  { --i: 3; --c1: #0ea5e9; --c2: #2563eb; --b1: #1d4ed8; --b2: #0369a1; --tint: #e0f2fe; }
.card--soon    { --i: 3; --c1: #f2b705; --c2: #ec4899; --b1: #8a5a00; --b2: #8a5a00; --tint: #fff1bf; }
/* Farbiger Verlaufsrand, erscheint beim Hover */
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; z-index: -1;
  background: linear-gradient(140deg, var(--c1), var(--c2));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .45s var(--ease);
}
/* Farbschimmer der Karte unten */
.card::after {
  content: ""; position: absolute; z-index: -2; width: 85%; aspect-ratio: 1; border-radius: 50%; left: 50%; bottom: -55%;
  translate: -50% 0; background: radial-gradient(circle, var(--tint), transparent 70%); opacity: .9;
  transition: transform .8s var(--ease), opacity .5s;
}
.glare { position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, var(--c1) 16%, transparent), transparent 55%); }

a.card:hover, a.card:focus-visible { --lift: -10px; box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 40px 80px -30px color-mix(in srgb, var(--c1) 55%, transparent); }
a.card:hover::before, a.card:focus-visible::before { opacity: 1; }
a.card:hover::after { transform: scale(1.35); }
a.card:hover .glare { opacity: 1; }
a.card:focus-visible { outline-offset: 6px; border-radius: var(--radius); }

.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; }
.icon { width: clamp(52px, 9vh, 72px); height: auto; aspect-ratio: 1; border-radius: 22%;
  box-shadow: 0 14px 30px -12px color-mix(in srgb, var(--c1) 70%, transparent);
  animation: float 6s ease-in-out infinite; animation-delay: calc(var(--i) * -1.4s);
  transition: transform .6s var(--spring); }
a.card:hover .icon { transform: scale(1.08) rotate(-6deg); }
.tag { font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .35rem .7rem; border-radius: 999px;
  color: var(--b1); background: color-mix(in srgb, var(--c1) 10%, #fff); white-space: nowrap; }

.card-body { flex: 1; display: flex; flex-direction: column; gap: .35rem; }
.name { font-size: clamp(1.3rem, 2vw, 1.65rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.text { color: var(--text-2); font-size: clamp(.88rem, 1vw, .97rem); }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; }
.chips span { font-size: .78rem; font-weight: 600; padding: .3rem .65rem; border-radius: 999px; border: 1px solid var(--border); background: rgba(255, 255, 255, .7); color: var(--text-2); }

.more { display: inline-flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 46px; padding: 0 .6rem 0 1.1rem; border-radius: 999px;
  font-weight: 650; font-size: .95rem; color: #fff; background: linear-gradient(120deg, var(--b1), var(--b2));
  position: relative; overflow: hidden; transition: box-shadow .4s var(--ease); }
.more::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .35) 50%, transparent 65%); transform: translateX(-120%); }
a.card:hover .more::after { animation: sweep 1s var(--ease); }
a.card:hover .more { box-shadow: 0 12px 26px -10px var(--c1); }
.more svg { width: 34px; height: 34px; padding: 8px; border-radius: 50%; background: rgba(255, 255, 255, .22); fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .5s var(--spring); }
a.card:hover .more svg { transform: translateX(4px); }

/* Logo mit transparentem Hintergrund: helle Kachel */
.icon-light { background: #fff; padding: 6%; border: 1px solid var(--border); object-fit: contain; }

/* Platzhalterkarte (für ein künftiges Projekt: class="card card-soon card--soon" role="group") */
.card-soon { background: rgba(255, 255, 255, .45); border: 1.5px dashed rgba(15, 23, 42, .16); box-shadow: none; }
.icon-soon { display: grid; place-items: center; background: linear-gradient(135deg, var(--tint), #fde7f3); box-shadow: none; }
.icon-soon svg { width: 44%; height: 44%; fill: none; stroke: var(--text-2); stroke-width: 2.2; stroke-linecap: round; animation: spin 10s linear infinite; }
.card-soon .tag { color: #8a5a00; background: #fff0cc; }
.skeleton { display: flex; flex-direction: column; gap: .45rem; margin-top: auto; }
.skeleton i { height: 10px; border-radius: 999px; background: linear-gradient(90deg, rgba(15, 23, 42, .06), rgba(15, 23, 42, .12), rgba(15, 23, 42, .06)); background-size: 200% 100%; animation: shimmer 1.8s linear infinite; }
.skeleton i:nth-child(2) { width: 62%; }
.card-soon .more { background: transparent; color: var(--text-2); border: 1.5px dashed rgba(15, 23, 42, .16); justify-content: center; padding: 0 1rem; }

/* Fuß */
.foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-size: .85rem; color: var(--text-2); animation: rise .9s var(--ease) 1.1s both; }
.foot nav { display: flex; gap: 1.2rem; }
.foot a { padding: .4rem .1rem; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .35s var(--ease), color .25s; }
.foot a:hover { color: var(--text); background-size: 100% 1.5px; }

/* Keyframes */
@keyframes drift { to { transform: translate(6vmax, -5vmax) scale(1.18); } }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
@keyframes shine { to { background-position: 100% 0; } }
@keyframes dropIn { from { opacity: 0; transform: translateY(-24px); } }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes wordUp { to { transform: none; } }
@keyframes cardIn { from { opacity: 0; translate: 0 50px; scale: .94; filter: blur(6px); } to { opacity: 1; translate: 0 0; scale: 1; filter: none; } }
@keyframes float { 50% { translate: 0 -6px; } }
@keyframes sweep { to { transform: translateX(120%); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes spin { to { rotate: 360deg; } }

/* Kleinere Höhe: Chips weglassen, damit alles auf eine Seite passt */
@media (max-height: 700px) and (min-width: 1024px) {
  .chips { display: none; }
  .eyebrow { display: none; }
}

/* Sehr niedrige Fenster: Scrollen erlauben statt abschneiden */
@media (max-height: 600px) {
  body { overflow: auto; }
  .page { height: auto; min-height: 100svh; }
  .card { height: auto; min-height: 280px; }
}

/* Tablet: 2 x 2, Scrollen erlaubt */
@media (max-width: 1023px) {
  body { overflow: auto; }
  .page { height: auto; min-height: 100svh; grid-template-rows: auto auto auto auto; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { height: auto; max-height: none; min-height: 300px; }
}
/* Handy: kompakte Karten untereinander, Icon neben dem Namen */
@media (max-width: 600px) {
  .page { width: calc(100% - 32px); padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .intro { padding-top: .4rem; }
  .cards { grid-template-columns: 1fr; gap: .9rem; }
  .card { min-height: 0; display: grid; grid-template-columns: auto 1fr; column-gap: .9rem; row-gap: .35rem; padding: 1rem; border-radius: 24px; }
  .card-top { display: contents; }
  .icon { width: 56px; grid-row: 1 / 3; grid-column: 1; align-self: start; }
  .tag { grid-row: 1; grid-column: 2; justify-self: start; font-size: .66rem; padding: .25rem .6rem; }
  .card-body { grid-row: 2; grid-column: 2; }
  .name { font-size: 1.2rem; }
  .chips { display: none; }
  .more { grid-column: 1 / -1; min-height: 48px; margin-top: .5rem; }
  .foot { flex-direction: column; gap: .2rem; }
  .foot a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: .4rem; }
  .status { font-size: .8rem; padding: .45rem .8rem; }
  /* Hintergrund leichter rechnen auf schwachen Geräten */
  .aurora i { filter: blur(60px); animation-duration: 40s; }
  .grain { display: none; }
}

/* Touch-Geräte: kein "hängender" Hover nach dem Tippen, dafür Druck-Feedback */
@media (hover: none) {
  a.card:hover:not(:focus-visible) { --lift: 0px; box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 24px 60px -30px rgba(15, 23, 42, .28); }
  a.card:hover:not(:focus-visible)::before, a.card:hover .glare { opacity: 0; }
  a.card:hover::after { transform: none; }
  a.card:hover .icon { transform: none; }
  a.card { -webkit-tap-highlight-color: transparent; }
  a.card:active { transform: scale(.97); transition-duration: .15s; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .card { transform: none !important; }
}
