/* ==========================================================================
   HAASE MEDIA – Homepage Enhancements
   Stand: 2026-02-03
   Erweitert das Basis-Design-System für die Startseite
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero – Hintergrund-Atmosphäre
   -------------------------------------------------------------------------- */
.hero {
  background:
    radial-gradient(ellipse 900px 700px at 75% 30%, rgba(201, 130, 58, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 600px 500px at 15% 80%, rgba(201, 130, 58, 0.04) 0%, transparent 50%),
    linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface-alt) 100%);
}

/* Subtiler geometrischer Akzent */
.hero::before {
  content: '';
  position: absolute;
  top: 15%;
  right: 5%;
  width: 400px;
  height: 400px;
  border: 1px solid var(--color-border-subtle);
  border-radius: 50%;
  opacity: 0.4;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 10%;
  left: 8%;
  width: 200px;
  height: 200px;
  border: 1px solid var(--color-border-subtle);
  border-radius: 50%;
  opacity: 0.3;
  pointer-events: none;
}

@media (max-width: 900px) {
  .hero::before,
  .hero::after {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Hero – Eingangsanimationen (Orchestriert)
   -------------------------------------------------------------------------- */
.hero-content > * {
  opacity: 0;
  transform: translateY(32px);
  animation: heroReveal 0.9s var(--ease-out-expo) forwards;
}

.hero-content > h1 { animation-delay: 0.1s; }
.hero-content > .lead { animation-delay: 0.25s; }
.hero-content > .hero-buttons { animation-delay: 0.4s; }

.hero-image {
  opacity: 0;
  transform: translateX(40px);
  animation: heroImageReveal 1s var(--ease-out-expo) 0.3s forwards;
}

@keyframes heroReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroImageReveal {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* --------------------------------------------------------------------------
   Hero Image – Hover-Effekt
   -------------------------------------------------------------------------- */
.hero-image img {
  transition: transform var(--duration-slow) var(--ease-out-expo);
}

.hero-image:hover img {
  transform: scale(1.02);
}

/* Floating Animation für den dekorativen Rahmen */
.hero-image::before {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(4px, -6px); }
}

/* --------------------------------------------------------------------------
   Scroll Reveal – Universell
   -------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity var(--duration-slower) var(--ease-out-expo),
    transform var(--duration-slower) var(--ease-out-expo);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered Delays */
[data-reveal-delay="1"] { transition-delay: 0.1s; }
[data-reveal-delay="2"] { transition-delay: 0.2s; }
[data-reveal-delay="3"] { transition-delay: 0.3s; }
[data-reveal-delay="4"] { transition-delay: 0.4s; }

/* --------------------------------------------------------------------------
   Section Header – Akzentlinie Animation
   -------------------------------------------------------------------------- */
.section-header h2::after {
  width: 48px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--duration-slower) var(--ease-out-expo) 0.2s;
}

.section-header.is-visible h2::after,
[data-reveal].is-visible .section-header h2::after,
.section-header h2::after {
  transform: scaleX(1);
}

/* Wenn das parent [data-reveal] sichtbar wird */
[data-reveal].is-visible h2::after {
  transform: scaleX(1);
}

/* --------------------------------------------------------------------------
   Cards – Erweiterte Interaktionen
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  overflow: hidden;
}

/* Subtiler Glanz-Effekt auf Hover */
.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.08),
    transparent
  );
  transform: translateX(-220%);
  transition: transform var(--duration-slow) var(--ease-out-expo);
  pointer-events: none;
}

.card:hover::after {
  transform: translateX(220%);
}

/* Card Icon/Number Indicator */
.card h3::before {
  content: '';
  display: block;
  width: 40px;
  height: 40px;
  background: var(--color-surface-alt);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 22px;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  transition:
    transform var(--duration-normal) var(--ease-out-expo),
    background var(--duration-normal) var(--ease-out-expo),
    background-color var(--duration-normal) var(--ease-out-expo),
    box-shadow var(--duration-normal) var(--ease-out-expo);
}

.card:hover h3::before {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
  transform: scale(1.05);
}

/* Icons */
.card:nth-child(1) h3::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9823a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Cpath d='M3 9h18'/%3E%3Cpath d='M9 21V9'/%3E%3C/svg%3E");
}

.card:nth-child(2) h3::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9823a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z'/%3E%3C/svg%3E");
}

.card:nth-child(3) h3::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9823a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2v4m0 12v4M4.93 4.93l2.83 2.83m8.48 8.48l2.83 2.83M2 12h4m12 0h4M4.93 19.07l2.83-2.83m8.48-8.48l2.83-2.83'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3C/svg%3E");
}

.card:nth-child(4) h3::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9823a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 1v3'/%3E%3Cpath d='M9.5 3.5 12 4l2.5-.5'/%3E%3Cpath d='M6 8a6 6 0 1 1 12 0c0 6-6 9-6 9s-6-3-6-9Z'/%3E%3Cpath d='M9 20h6'/%3E%3Cpath d='M10 23h4'/%3E%3C/svg%3E");
}

.card:nth-child(5) h3::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9823a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2 3 6v6c0 5 4 9 9 10 5-1 9-5 9-10V6l-9-4Z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E");
}

.card:nth-child(6) h3::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9823a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2v20'/%3E%3Cpath d='M6 6h6'/%3E%3Cpath d='M6 12h6'/%3E%3Cpath d='M6 18h6'/%3E%3Cpath d='M14 7.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5Z'/%3E%3Cpath d='M14 13.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5Z'/%3E%3C/svg%3E");
}

.card:nth-child(1):hover h3::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Cpath d='M3 9h18'/%3E%3Cpath d='M9 21V9'/%3E%3C/svg%3E");
}

.card:nth-child(2):hover h3::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z'/%3E%3C/svg%3E");
}

.card:nth-child(3):hover h3::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2v4m0 12v4M4.93 4.93l2.83 2.83m8.48 8.48l2.83 2.83M2 12h4m12 0h4M4.93 19.07l2.83-2.83m8.48-8.48l2.83-2.83'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3C/svg%3E");
}

.card:nth-child(4):hover h3::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 1v3'/%3E%3Cpath d='M9.5 3.5 12 4l2.5-.5'/%3E%3Cpath d='M6 8a6 6 0 1 1 12 0c0 6-6 9-6 9s-6-3-6-9Z'/%3E%3Cpath d='M9 20h6'/%3E%3Cpath d='M10 23h4'/%3E%3C/svg%3E");
}

.card:nth-child(5):hover h3::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2 3 6v6c0 5 4 9 9 10 5-1 9-5 9-10V6l-9-4Z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E");
}

.card:nth-child(6):hover h3::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2v20'/%3E%3Cpath d='M6 6h6'/%3E%3Cpath d='M6 12h6'/%3E%3Cpath d='M6 18h6'/%3E%3Cpath d='M14 7.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5Z'/%3E%3Cpath d='M14 13.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5Z'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   Client Logos – Sanfte Bewegung
   -------------------------------------------------------------------------- */
.client-logo-item {
  transition: transform var(--duration-normal) var(--ease-out-expo);
}

.client-logo-item:hover {
  transform: translateY(-4px);
}

/* --------------------------------------------------------------------------
   Profile Section – Erweitertes Styling
   -------------------------------------------------------------------------- */
.profile-grid img {
  position: relative;
}

/* Dezenter Akzentrahmen */
.profile-grid > img {
  outline: 3px solid var(--color-accent);
  outline-offset: 8px;
  transition: outline-offset var(--duration-normal) var(--ease-out-expo);
}

.profile-grid > img:hover {
  outline-offset: 12px;
}

/* Text-Styling im Profil */
.profile-grid p:first-of-type {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
}

/* --------------------------------------------------------------------------
   "Für wen" Section – Polierte Boxes
   -------------------------------------------------------------------------- */
#fuer-wen .two-col-grid > div {
  padding: var(--space-8);
  border-radius: var(--radius-lg);
  transition:
    transform var(--duration-normal) var(--ease-out-expo),
    box-shadow var(--duration-normal) var(--ease-out-expo),
    border-color var(--duration-normal) var(--ease-out-expo);
}

/* --------------------------------------------------------------------------
   Ablauf – Luft um die Schritt-Zahlen
   -------------------------------------------------------------------------- */
#ablauf .step {
  padding-top: var(--space-4);
}

@media (min-width: 768px) {
  #ablauf .step {
    padding-top: var(--space-16);
  }
}

#fuer-wen .two-col-grid > div:first-child {
  background: linear-gradient(135deg, var(--color-positive-bg) 0%, #f0fdf4 100%);
  border: 1px solid rgba(61, 139, 110, 0.15);
}

#fuer-wen .two-col-grid > div:first-child:hover {
  box-shadow: 0 12px 40px rgba(61, 139, 110, 0.1);
  transform: translateY(-4px);
}

#fuer-wen .two-col-grid > div:last-child {
  background: linear-gradient(135deg, var(--color-negative-bg) 0%, #fef2f2 100%);
  border: 1px solid rgba(199, 92, 92, 0.15);
}

#fuer-wen .two-col-grid > div:last-child:hover {
  box-shadow: 0 12px 40px rgba(199, 92, 92, 0.1);
  transform: translateY(-4px);
}

#fuer-wen h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-lg);
}

/* --------------------------------------------------------------------------
   CTA Section – Erweitert
   -------------------------------------------------------------------------- */
.cta-section {
  background:
    radial-gradient(ellipse 1000px 600px at 30% 40%, rgba(201, 130, 58, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse 800px 600px at 70% 60%, rgba(201, 130, 58, 0.1) 0%, transparent 50%),
    var(--color-ink);
}

.cta-section h2 {
  font-size: clamp(var(--text-2xl), 5vw, var(--text-4xl));
}

/* Buttons nebeneinander mit mehr Abstand */
.cta-section .btn {
  margin: var(--space-2);
}

@media (min-width: 600px) {
  .cta-section .btn {
    margin: 0 var(--space-3);
  }
}

/* --------------------------------------------------------------------------
   Buttons – Hover-Ripple-Effekt
   -------------------------------------------------------------------------- */
.btn--primary {
  position: relative;
  overflow: hidden;
}

.btn--primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 320px;
  height: 320px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.6s var(--ease-out-expo);
}

.btn--primary:hover::before {
  transform: translate(-50%, -50%) scale(1);
}

/* --------------------------------------------------------------------------
   Footer – Subtile Verbesserungen
   -------------------------------------------------------------------------- */
.footer {
  background:
    radial-gradient(ellipse 600px 400px at 10% 90%, rgba(201, 130, 58, 0.06) 0%, transparent 50%),
    var(--color-ink);
}

.footer-nav a {
  position: relative;
  display: inline-block;
}

.footer-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-normal) var(--ease-out-expo);
}

.footer-nav a:hover::after {
  transform: scaleX(1);
}

/* --------------------------------------------------------------------------
   Smooth Scroll Offset für Sticky Header
   -------------------------------------------------------------------------- */
[id] {
  scroll-margin-top: 100px;
}

/* --------------------------------------------------------------------------
   Reduced Motion – Barrierefreiheit
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .hero-content > *,
  .hero-image {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* --------------------------------------------------------------------------
   Homepage – Kurzfakten im Hero
   -------------------------------------------------------------------------- */
.hero-facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  margin: var(--space-10) 0 0;
  padding: 0;
}

@media (min-width: 600px) {
  .hero-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.hero-fact {
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-sm);
}

.hero-fact dt {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-ink);
  margin: 0 0 var(--space-2) 0;
}

.hero-fact dd {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-snug);
}

/* --------------------------------------------------------------------------
   Homepage – Projektvorschau Grid
   -------------------------------------------------------------------------- */
.work-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 760px) {
  .work-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-8);
  }
}

.work-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--duration-slow) var(--ease-out-expo),
    box-shadow var(--duration-slow) var(--ease-out-expo),
    border-color var(--duration-slow) var(--ease-out-expo);
}

.work-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: var(--color-border-subtle);
}

.work-card__media {
  position: relative;
  height: clamp(190px, 22vw, 260px);
  background: var(--color-surface-alt);
}

.work-card__media::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 480px 360px at 20% 20%, rgba(201, 130, 58, 0.20) 0%, transparent 60%),
    radial-gradient(ellipse 540px 420px at 80% 70%, rgba(26, 26, 46, 0.10) 0%, transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(248, 247, 244, 0.9) 100%);
  filter: saturate(110%);
}

.work-card__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(26, 26, 46, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 26, 46, 0.05) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.35;
  mix-blend-mode: multiply;
}

.work-card__media--website::before {
  background:
    radial-gradient(ellipse 520px 420px at 15% 20%, rgba(201, 130, 58, 0.26) 0%, transparent 60%),
    radial-gradient(ellipse 520px 380px at 80% 75%, rgba(201, 130, 58, 0.14) 0%, transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f8f7f4 100%);
}

.work-card__media--wordpress::before {
  background:
    radial-gradient(ellipse 520px 420px at 25% 25%, rgba(61, 139, 110, 0.22) 0%, transparent 60%),
    radial-gradient(ellipse 520px 380px at 80% 75%, rgba(26, 26, 46, 0.10) 0%, transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f7fbf9 100%);
}

.work-card__media--automation::before {
  background:
    radial-gradient(ellipse 520px 420px at 25% 25%, rgba(201, 130, 58, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 520px 420px at 80% 65%, rgba(26, 26, 46, 0.16) 0%, transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f6f5f9 100%);
}

.work-card__tag {
  position: absolute;
  left: var(--space-6);
  bottom: var(--space-6);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(26, 26, 46, 0.12);
  box-shadow: var(--shadow-sm);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-ink);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  transition: transform var(--duration-normal) var(--ease-out-expo);
}

.work-card:hover .work-card__tag {
  transform: translateY(-2px);
}

.work-card__body {
  padding: var(--space-8);
}

.work-card__kicker {
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 700;
  margin: 0 0 var(--space-3) 0;
}

.work-card__title {
  margin: 0 0 var(--space-3) 0;
  font-size: var(--text-xl);
}

.work-card__text {
  margin: 0 0 var(--space-6) 0;
  color: var(--color-text-muted);
}

.work-card__link {
  margin-top: auto;
}
