/* ============================================================
   greylo.de – MAXIMAL verspieltes Stylesheet 🎪
   ============================================================ */

:root {
  --ink: #0F2436;
  --ink-soft: #3D5568;
  --deep: #0E6BA8;
  --aqua: #37B6D9;
  --aqua-light: #7FD6EC;
  --mist: #EAF4F8;
  --paper: #FBFDFE;
  --coral: #F2705B;
  --sun: #FFC857;
  --lila: #9B7EDE;
  --radius: 18px;
  --shadow: 0 8px 30px rgba(15, 36, 54, 0.10);
  --maxw: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  overflow-x: hidden;
}
@media (min-width: 900px) and (pointer: fine) {
  body.fancy-cursor, body.fancy-cursor a, body.fancy-cursor button { cursor: none; }
}

h1, h2, h3 { font-family: 'Space Grotesk', sans-serif; line-height: 1.12; letter-spacing: -0.015em; }

.mono {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--deep);
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
a { color: var(--deep); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--aqua); outline-offset: 2px; border-radius: 4px; }

/* ============ Scroll-Fortschrittsbalken ============ */
.scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 200;
  height: 4px; width: 0;
  background: linear-gradient(90deg, var(--aqua), var(--coral), var(--sun), var(--lila));
  background-size: 300% 100%;
  animation: shimmer 4s linear infinite;
  border-radius: 0 4px 4px 0;
}

/* ============ Custom Cursor ============ */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 999;
  pointer-events: none; border-radius: 50%;
  transform: translate(-50%, -50%);
  display: none;
}
@media (min-width: 900px) and (pointer: fine) {
  body.fancy-cursor .cursor-dot, body.fancy-cursor .cursor-ring { display: block; }
}
.cursor-dot { width: 8px; height: 8px; background: var(--coral); }
.cursor-ring {
  width: 34px; height: 34px;
  border: 2px solid var(--aqua);
  transition: width 0.2s, height 0.2s, border-color 0.2s, background 0.2s;
}
.cursor-ring.grow {
  width: 54px; height: 54px;
  border-color: var(--coral);
  background: rgba(242, 112, 91, 0.1);
}
.cursor-trail {
  position: fixed; z-index: 998; pointer-events: none;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--aqua-light);
  transform: translate(-50%, -50%);
  animation: trailFade 0.6s ease-out forwards;
}
@keyframes trailFade { to { opacity: 0; transform: translate(-50%, -50%) scale(0.2); } }

/* ============ Scroll-Reveal ============ */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.in { opacity: 1; transform: none; }
.reveal-left  { transform: translateX(-40px); }
.reveal-right { transform: translateX(40px); }
.reveal-pop   { transform: scale(0.8); }
.reveal-left.in, .reveal-right.in, .reveal-pop.in { transform: none; }

/* ============ Header ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251, 253, 254, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--mist);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 0.65rem; padding-bottom: 0.65rem; }
.logo img { display: block; height: 40px; width: auto; transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.logo:hover img { transform: rotate(-6deg) scale(1.1); }
.logo:active img { transform: rotate(354deg) scale(1.1); transition: transform 0.6s; }

.nav { display: none; gap: 1.5rem; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 500; font-size: 0.95rem; position: relative; padding: 2px 0; }
.nav a::after {
  content: ''; position: absolute; left: 0; bottom: -3px; width: 100%; height: 2.5px; border-radius: 2px;
  background: linear-gradient(90deg, var(--aqua), var(--coral));
  transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease;
}
.nav a:hover::after { transform: scaleX(1); }
.nav a:hover { animation: navJiggle 0.4s ease; }
@keyframes navJiggle { 25% { transform: translateY(-2px) rotate(-1.5deg); } 75% { transform: translateY(1px) rotate(1deg); } }

.nav-toggle { display: inline-flex; flex-direction: column; gap: 5px; background: none; border: none; padding: 8px; cursor: pointer; }
.nav-toggle span { width: 24px; height: 2.5px; background: var(--ink); border-radius: 2px; transition: 0.3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.nav.open {
  display: flex; position: absolute; top: 100%; left: 0; right: 0;
  flex-direction: column; background: var(--paper);
  border-bottom: 1px solid var(--mist);
  padding: 1rem 1.25rem 1.25rem; box-shadow: var(--shadow);
  animation: dropIn 0.3s ease;
}
@keyframes dropIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@media (min-width: 760px) {
  .nav { display: flex !important; position: static; flex-direction: row; background: none; border: none; box-shadow: none; padding: 0; animation: none; }
  .nav-toggle { display: none; }
}

/* ============ Hero ============ */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--ink) 0%, #123A5C 50%, var(--deep) 100%);
  color: #fff; padding: 4.5rem 0 0; overflow: hidden;
}
.hero .wrap { position: relative; z-index: 3; }

/* wabernde Farb-Blobs im Hintergrund */
.blob {
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.35; z-index: 0;
  animation: blobFloat 14s ease-in-out infinite alternate;
}
.blob-1 { width: 340px; height: 340px; background: var(--aqua); top: -80px; right: -60px; }
.blob-2 { width: 280px; height: 280px; background: var(--lila); bottom: 40px; left: -90px; animation-delay: -5s; }
.blob-3 { width: 220px; height: 220px; background: var(--coral); top: 30%; left: 45%; animation-delay: -9s; }
@keyframes blobFloat {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(40px, -30px) scale(1.15); }
  100% { transform: translate(-30px, 25px) scale(0.95); }
}

.bubbles { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.bubble {
  position: absolute; bottom: -60px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, rgba(255,255,255,0.55), rgba(255,255,255,0.06) 60%);
  border: 1px solid rgba(255,255,255,0.25);
  animation: rise linear infinite;
}
@keyframes rise {
  0%   { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
  8%   { opacity: 0.9; }
  50%  { transform: translateY(-46vh) translateX(14px) scale(1.05); }
  100% { transform: translateY(-95vh) translateX(-10px) scale(1.12); opacity: 0; }
}

/* Schwimmende Fische */
.fish {
  position: absolute; z-index: 2; font-size: 1.6rem; pointer-events: none;
  animation: swim linear infinite;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
}
@keyframes swim {
  0%   { transform: translateX(-8vw) translateY(0) scaleX(-1); }
  25%  { transform: translateX(28vw) translateY(-14px) scaleX(-1); }
  50%  { transform: translateX(60vw) translateY(8px) scaleX(-1); }
  100% { transform: translateX(112vw) translateY(-6px) scaleX(-1); }
}

.hero .mono { color: var(--aqua-light); }
.hero h1 { font-size: clamp(2.1rem, 6.5vw, 3.6rem); margin: 0.7rem 0 1.1rem; max-width: 20ch; }
.hero h1 .gradient-word {
  background: linear-gradient(90deg, var(--aqua-light), var(--aqua), var(--sun), var(--aqua-light));
  background-size: 280% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 5s linear infinite;
}
@keyframes shimmer { to { background-position: 280% 0; } }
.hero h1 .w { display: inline-block; opacity: 0; transform: translateY(0.6em) rotate(3deg); animation: popWord 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
@keyframes popWord { to { opacity: 1; transform: none; } }

/* Tipp-Effekt-Zeile */
.typed-line {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.95rem; color: var(--aqua-light);
  min-height: 1.6em; margin-bottom: 1.2rem;
  opacity: 0; animation: fadeUp 0.6s ease 0.7s forwards;
}
.typed-line::after { content: '▌'; animation: blink 0.9s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero p.lead { max-width: 52ch; font-size: 1.06rem; color: #D7E7F2; margin-bottom: 1.6rem; opacity: 0; animation: fadeUp 0.8s ease 0.9s forwards; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 4rem; opacity: 0; animation: fadeUp 0.8s ease 1.1s forwards; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.btn {
  display: inline-block; text-decoration: none; font-weight: 600;
  padding: 0.8rem 1.5rem; border-radius: 999px; font-size: 0.98rem;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
  will-change: transform;
}
.btn:hover { transform: translateY(-3px) scale(1.03); }
.btn:active { transform: scale(0.94); }
.btn-primary {
  background: var(--coral); color: #fff;
  box-shadow: 0 4px 16px rgba(242, 112, 91, 0.4);
  position: relative; overflow: hidden;
}
.btn-primary::after {
  content: ''; position: absolute; top: 0; left: -80%;
  width: 50%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.45), transparent);
  transform: skewX(-20deg);
  animation: sheen 3.5s ease-in-out infinite;
}
@keyframes sheen { 0%, 60% { left: -80%; } 100% { left: 130%; } }
.btn-primary:hover { box-shadow: 0 8px 24px rgba(242, 112, 91, 0.5); }
.btn-ghost { border: 1.5px solid rgba(255,255,255,0.5); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,0.08); }

.waves { position: relative; z-index: 2; display: block; width: 100%; height: 90px; margin-bottom: -1px; }
.wave-layer { animation: waveMove 9s linear infinite; }
.wave-layer.slow { animation-duration: 15s; animation-direction: reverse; }
@keyframes waveMove { from { transform: translateX(0); } to { transform: translateX(-720px); } }

/* ============ Ticker ============ */
.ticker {
  background: var(--ink); color: var(--aqua-light);
  overflow: hidden; padding: 0.7rem 0;
  font-family: 'IBM Plex Mono', monospace; font-size: 0.85rem;
  letter-spacing: 0.05em; white-space: nowrap;
}
.ticker-track { display: inline-block; animation: ticker 28s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker span { margin: 0 1.4rem; }
.ticker em { font-style: normal; color: var(--sun); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ============ Sections ============ */
section { padding: 4rem 0; }
.section-head { margin-bottom: 2.2rem; }
.section-head h2 { font-size: clamp(1.6rem, 4.5vw, 2.3rem); margin-top: 0.4rem; }
.section-head p { color: var(--ink-soft); max-width: 60ch; margin-top: 0.5rem; }

/* Wackelige Trenn-Wellen zwischen Sektionen */
.squiggle { display: block; width: 100%; height: 26px; }
.squiggle path {
  stroke-dasharray: 12 8;
  animation: dashMove 1.6s linear infinite;
}
@keyframes dashMove { to { stroke-dashoffset: -20; } }

/* ============ Leistungen ============ */
.services { background: var(--mist); position: relative; }
.service-grid { display: grid; grid-template-columns: 1fr; gap: 1.2rem; perspective: 900px; }
@media (min-width: 640px) { .service-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .service-grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: #fff; border-radius: var(--radius); padding: 1.6rem 1.5rem;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 0.55rem;
  position: relative; border: 2px solid transparent;
  transition: transform 0.25s ease-out, box-shadow 0.35s, border-color 0.35s;
  transform-style: preserve-3d;
  will-change: transform;
}
.card:hover { box-shadow: 0 18px 40px rgba(14, 107, 168, 0.18); border-color: var(--aqua); }
.card h3 { font-size: 1.14rem; }
.card p { color: var(--ink-soft); font-size: 0.95rem; }
.card ul { padding-left: 1.1rem; color: var(--ink-soft); font-size: 0.92rem; }
.card li { margin-bottom: 0.25rem; }
.card .icon {
  width: 48px; height: 48px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--mist), #fff);
  border: 1.5px solid var(--mist); border-radius: 13px; font-size: 1.5rem;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.card:hover .icon { transform: rotate(-12deg) scale(1.22); animation: iconBounce 0.5s ease 0.1s; }
@keyframes iconBounce { 40% { transform: rotate(-12deg) scale(1.35); } 100% { transform: rotate(-12deg) scale(1.22); } }
.service-grid .card.reveal { transition: opacity 0.6s ease var(--d, 0s), transform 0.6s cubic-bezier(0.22,1,0.36,1) var(--d, 0s), box-shadow 0.35s, border-color 0.35s; }

/* ============ Stats ============ */
.stats { padding: 3rem 0; }
.stats .wrap { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; text-align: center; }
@media (min-width: 760px) { .stats .wrap { grid-template-columns: repeat(4, 1fr); } }
.stat b {
  display: block; font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 6vw, 2.8rem); color: var(--deep);
}
.stat span { color: var(--ink-soft); font-size: 0.92rem; }
.stat:hover b { animation: statPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); color: var(--coral); }
@keyframes statPop { 50% { transform: scale(1.2) rotate(-3deg); } }

/* ============ Über mich ============ */
.about .wrap { display: grid; gap: 2rem; }
@media (min-width: 860px) { .about .wrap { grid-template-columns: 1.2fr 1fr; align-items: center; } }
.about-facts {
  background: var(--ink); color: #DCEAF4;
  border-radius: var(--radius); padding: 1.7rem;
  position: relative; overflow: hidden;
}
.about-facts::before {
  content: ''; position: absolute; top: -40px; right: -40px;
  width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(55,182,217,0.35), transparent 70%);
  animation: pulseGlow 4s ease-in-out infinite;
}
@keyframes pulseGlow { 0%,100% { transform: scale(1); opacity: 0.7; } 50% { transform: scale(1.25); opacity: 1; } }
.about-facts .mono { color: var(--aqua); }
.about-facts ul { list-style: none; margin-top: 0.8rem; }
.about-facts li { padding: 0.55rem 0; border-bottom: 1px solid rgba(255,255,255,0.12); font-size: 0.95rem; transition: transform 0.25s, color 0.25s; }
.about-facts li:hover { transform: translateX(8px); color: #fff; }
.about-facts li:last-child { border-bottom: none; }

.floaty { display: inline-block; animation: floaty 3s ease-in-out infinite; }
@keyframes floaty { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-7px) rotate(6deg); } }

/* Klick-Wobble für Emojis */
.boing { animation: boing 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes boing { 30% { transform: scale(1.6) rotate(-15deg); } 60% { transform: scale(0.85) rotate(8deg); } }

/* ============ Kontakt ============ */
.contact { background: var(--mist); }
.contact-grid { display: grid; gap: 2rem; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1fr 1.2fr; } }

form .field { margin-bottom: 1rem; }
form label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 0.3rem; }
form input, form textarea {
  width: 100%; border: 1.5px solid #C7DCE7; border-radius: 12px;
  padding: 0.75rem 0.95rem; font: inherit; background: #fff;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
form input:focus, form textarea:focus {
  outline: none; border-color: var(--aqua);
  box-shadow: 0 0 0 4px rgba(55, 182, 217, 0.22);
  transform: translateY(-2px) rotate(-0.3deg);
}
form button { border: none; cursor: pointer; font: inherit; }
.form-note { font-size: 0.83rem; color: var(--ink-soft); margin-top: 0.6rem; }
.alert { border-radius: 12px; padding: 0.85rem 1rem; margin-bottom: 1rem; font-size: 0.95rem; animation: alertBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes alertBounce { 0% { opacity: 0; transform: scale(0.7) translateY(10px); } 100% { opacity: 1; transform: none; } }
.alert-ok  { background: #E2F6E9; color: #1B6B3A; border: 1px solid #9ADBB2; }
.alert-err { background: #FCE9E5; color: #A5372A; border: 1px solid #F0B4A9; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* Konfetti */
.confetti {
  position: fixed; z-index: 500; top: -12px;
  width: 10px; height: 14px; pointer-events: none;
  animation: confettiFall linear forwards;
}
@keyframes confettiFall {
  to { transform: translateY(105vh) rotate(720deg); opacity: 0.8; }
}

/* Sparkles */
.sparkle {
  position: fixed; z-index: 500; pointer-events: none;
  font-size: 1rem;
  animation: sparklePop 0.7s ease-out forwards;
}
@keyframes sparklePop {
  0%   { opacity: 1; transform: translate(-50%, -50%) scale(0.3) rotate(0deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.4) rotate(60deg) translateY(-30px); }
}

/* ============ Footer ============ */
.site-footer { background: var(--ink); color: #B9CEDD; padding: 2.2rem 0; font-size: 0.9rem; position: relative; overflow: hidden; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; position: relative; z-index: 1; }
.site-footer a { color: #DCEAF4; text-decoration: none; margin-left: 1rem; transition: color 0.2s; }
.site-footer a:first-child { margin-left: 0; }
.site-footer a:hover { color: var(--aqua); }
.footer-fish { position: absolute; bottom: 8px; font-size: 1.2rem; opacity: 0.5; animation: swim 24s linear infinite; }

/* ============ Easter Egg: Party-Modus ============ */
body.party { animation: partyHue 3s linear infinite; }
@keyframes partyHue { to { filter: hue-rotate(360deg); } }
body.party .hero h1 .w { animation: partyJump 0.8s ease-in-out infinite alternate; }
@keyframes partyJump { to { transform: translateY(-8px) rotate(-3deg); } }

/* ============ Unterseiten ============ */
.page { padding: 3rem 0 4rem; }
.page h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); margin-bottom: 1.2rem; }
.page h2 { font-size: 1.2rem; margin: 1.6rem 0 0.5rem; }
.page p, .page address { color: var(--ink-soft); font-style: normal; margin-bottom: 0.6rem; }

/* ============ Reduced Motion ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .hero p.lead, .hero-actions, .hero h1 .w, .typed-line { opacity: 1 !important; transform: none !important; }
  .cursor-dot, .cursor-ring { display: none !important; }
  body.fancy-cursor, body.fancy-cursor a, body.fancy-cursor button { cursor: auto; }
}
