/*
 * Layout
 * Florelie Website - Grid systems, sections, and page layouts
 */

/* ========================================
   CONTAINER
   ======================================== */

.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-sm {
  max-width: var(--container-sm);
}

.container-md {
  max-width: var(--container-md);
}

.container-lg {
  max-width: var(--container-lg);
}

/* ========================================
   SECTIONS
   ======================================== */

.section {
  padding: var(--space-4xl) 0;
  position: relative;
}

/* Larger padding on desktop */
@media (min-width: 768px) {
  .section {
    padding: var(--space-5xl) 0;
  }
}

/* Section Backgrounds */
.section-white {
  background: var(--color-white);
}

.section-gray {
  background: var(--color-gray-whisper);
}

.section-sage {
  background: var(--color-sage-pale);
}

.section-sage-secondary {
  background: var(--color-sage-secondary-pale);
}

/* Legacy class names for backwards compatibility */
.section-purple {
  background: var(--color-sage-pale);
}

.section-pink {
  background: var(--color-sage-secondary-pale);
}

/* Section Header */
.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-header .topline {
  margin-bottom: var(--space-sm);
}

.section-header h2 {
  margin-bottom: var(--space-md);
}

.section-header .subline {
  max-width: 600px;
  margin: var(--space-sm) auto var(--space-lg);
}

/* ========================================
   GRID SYSTEMS
   ======================================== */

.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-gap-sm {
  gap: var(--space-md);
}

.grid-gap-lg {
  gap: var(--space-xl);
}

/* Grid alignment utilities */
.grid-align-start {
  align-items: start;
}

.grid-align-center {
  align-items: center;
}

.grid-align-end {
  align-items: end;
}

/* Auto-fit grids (responsive) */
.grid-auto-fit {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-auto-fill {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* Fixed column grids */
.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Desktop: Fixed columns */
@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ========================================
   FLEXBOX UTILITIES
   ======================================== */

.flex {
  display: flex;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex-start {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.flex-end {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-gap-sm {
  gap: var(--space-sm);
}

.flex-gap-md {
  gap: var(--space-md);
}

.flex-gap-lg {
  gap: var(--space-lg);
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  padding: var(--space-3xl) var(--space-lg);
  overflow: hidden;
}

/* Background Layer - wird gefadet ohne das Overlay zu beeinflussen */
.hero-background {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
  transition: opacity 1.2s ease-in-out;
  /* GPU acceleration for smoother transitions */
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Ken Burns Effekt nur auf Desktop für bessere Performance */
@media (min-width: 768px) {
  .hero-background {
    animation: kenBurns 20s ease-out infinite;
    will-change: transform;
  }
}

/* Ken Burns Animation - verwendet transform für bessere Performance */
@keyframes kenBurns {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-sage-dark);
  opacity: 0.3;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--color-white);
  max-width: var(--container-md);
}

.hero-logo {
  max-width: 200px;
  width: 40%;
  height: auto;
  margin: 0 auto var(--space-xl);
  filter: brightness(0) invert(1);
  filter: drop-shadow(3px 6px 20px black);
}

.hero h1 {
  color: var(--color-white);
  margin-bottom: var(--space-md);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  text-transform: uppercase;
  font-weight: 300;
}

.hero .subline {
  color: var(--color-white);
  margin-bottom: var(--space-2xl);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* Desktop hero adjustments */
@media (min-width: 768px) {
  .hero-logo {
    max-width: 250px;
    width: 30%;
  }
}

@media (min-width: 1024px) {
  .hero-logo {
    max-width: 300px;
    width: 25%;
  }
}

/* ========================================
   TWO-COLUMN LAYOUTS
   ======================================== */

.two-col {
  display: grid;
  gap: var(--space-xl);
  align-items: center;
}

@media (min-width: 768px) {
  .two-col {
    grid-template-columns: 1fr 1fr;
  }

  .two-col.col-40-60 {
    grid-template-columns: 40fr 60fr;
  }

  .two-col.col-60-40 {
    grid-template-columns: 60fr 40fr;
  }
}

/* ========================================
   CONTENT LAYOUTS
   ======================================== */

.content-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.content-wide {
  max-width: 1000px;
  margin: 0 auto;
}

/* Image + Text Layout */
.image-text-layout {
  display: grid;
  gap: var(--space-xl);
  align-items: center;
}

@media (min-width: 768px) {
  .image-text-layout {
    grid-template-columns: 1fr 1fr;
  }

  .image-text-layout.reverse {
    direction: rtl;
  }

  .image-text-layout.reverse > * {
    direction: ltr;
  }
}

/* Portrait Image (Organic Blob Shape) */
.portrait {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1;
  object-fit: cover;
  /* Organische, asymmetrische Form - wie eine natürliche Blütenform */
  border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%;
  box-shadow: var(--shadow-lg);
  margin: 0 auto;
  transition: all var(--transition-slow);
  /* Subtiler Rahmen in Lila */
  border: 3px solid var(--color-sage-light);
}

.portrait:hover {
  /* Leichte Animation beim Hover - Form ändert sich etwas */
  border-radius: 54% 46% 48% 52% / 62% 44% 56% 38%;
  box-shadow: 0 12px 32px 0 rgba(122, 93, 127, 0.2);
  transform: scale(1.02);
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
  background: var(--color-sage-dark);
  color: var(--color-white);
  padding: var(--space-3xl) 0 var(--space-xl);
  margin-top: auto;
}

.footer-content {
  display: grid;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer-logo {
  max-width: 150px;
  height: auto;
  margin-bottom: var(--space-md);
  filter: brightness(0) invert(1);
}

.footer h3 {
  color: var(--color-white);
  font-size: var(--text-lg);
  margin-bottom: var(--space-md);
}

.footer a {
  color: var(--color-white);
  opacity: 0.9;
  transition: opacity var(--transition-fast);
}

.footer a:hover {
  opacity: 1;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* Footer social icons - inverted colors */
.footer .social-icon {
  background: var(--color-white);
  color: var(--color-sage-dark);
}

.footer .social-icon:hover {
  background: var(--color-sage-medium);
  color: var(--color-white);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: var(--text-sm);
  opacity: 0.8;
}

/* ========================================
   SPACING UTILITIES
   ======================================== */

.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.pt-xs { padding-top: var(--space-xs); }
.pt-sm { padding-top: var(--space-sm); }
.pt-md { padding-top: var(--space-md); }
.pt-lg { padding-top: var(--space-lg); }
.pt-xl { padding-top: var(--space-xl); }

.pb-xs { padding-bottom: var(--space-xs); }
.pb-sm { padding-bottom: var(--space-sm); }
.pb-md { padding-bottom: var(--space-md); }
.pb-lg { padding-bottom: var(--space-lg); }
.pb-xl { padding-bottom: var(--space-xl); }

/* ========================================
   DISPLAY UTILITIES
   ======================================== */

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }

@media (max-width: 767px) {
  .hidden-mobile { display: none; }
}

@media (min-width: 768px) {
  .hidden-desktop { display: none; }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--color-sage-dark);
  color: var(--color-white);
  padding: var(--space-sm) var(--space-md);
  text-decoration: none;
  z-index: var(--z-tooltip);
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-md);
  opacity: 1;
  pointer-events: auto;
}
