/*
Theme Name: Wild Light Creative
Theme URI: https://wildlight.se
Description: Child theme for Wild Light Creative, based on Twenty Twenty-Five
Author: Wild Light Creative
Author URI: https://wildlight.se
Template: twentytwentyfive
Version: 1.0.0
Text Domain: wildlight
*/

/* =============================================
   RESET & BASE
   ============================================= */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  transition: color 0.2s ease, opacity 0.2s ease;
}

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

/* =============================================
   FULLBREDD – Tvinga HTML-block att ta hela bredden
   (löser "smalt i mitten"-problemet i TT25)
   ============================================= */

.wp-block-html {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

.entry-content > .wp-block-html,
.is-layout-constrained > .wp-block-html,
.wp-block-post-content > .wp-block-html,
.wp-block-post-content .wp-block-html {
  max-width: none !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Ta bort TT25:s globala padding på entry-content */
.entry-content.has-global-padding {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* =============================================
   HEADER
   ============================================= */

.wlc-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: box-shadow 0.3s ease;
}

.wlc-header.scrolled {
  box-shadow: 0 1px 0 rgba(0,0,0,0.08);
}

/* Logotyp centrerad absolut */
.wlc-header .wp-block-site-title {
  position: absolute !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  white-space: nowrap !important;
  pointer-events: auto;
}

.wlc-header .wp-block-navigation-item__content {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #1a1a1a;
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
}

.wlc-header .wp-block-navigation-item__content::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: #c8a882;
  transition: width 0.3s ease;
}

.wlc-header .wp-block-navigation-item__content:hover {
  color: #c8a882;
}

.wlc-header .wp-block-navigation-item__content:hover::after {
  width: 100%;
}

/* =============================================
   MOBILMENY – Helskärms overlay
   ============================================= */

#wlcHamburger {
  display: none !important;
}

.wp-block-navigation__responsive-container.is-menu-open {
  display: none !important;
}

.wlc-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background-color: #1a1a1a;
  z-index: 9999;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 3rem 2.5rem;
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.76, 0, 0.24, 1);
  overflow: hidden;
}

.wlc-mobile-overlay.is-open {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.wlc-overlay-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.wlc-overlay-close:hover { opacity: 1; }

.wlc-overlay-close svg {
  width: 28px;
  height: 28px;
  stroke: #faf8f5;
  fill: none;
}

.wlc-overlay-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
}

.wlc-overlay-nav li {
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.wlc-overlay-nav li a {
  display: block;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2.2rem, 10vw, 3.5rem);
  font-weight: 300;
  color: #faf8f5;
  text-decoration: none;
  letter-spacing: 0.02em;
  line-height: 1.2;
  padding: 0.3rem 0;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.76, 0, 0.24, 1),
              opacity 0.6s ease,
              color 0.2s ease;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.wlc-mobile-overlay.is-open .wlc-overlay-nav li a {
  transform: translateY(0);
  opacity: 1;
}

.wlc-mobile-overlay.is-open .wlc-overlay-nav li:nth-child(1) a { transition-delay: 0.10s; }
.wlc-mobile-overlay.is-open .wlc-overlay-nav li:nth-child(2) a { transition-delay: 0.18s; }
.wlc-mobile-overlay.is-open .wlc-overlay-nav li:nth-child(3) a { transition-delay: 0.26s; }
.wlc-mobile-overlay.is-open .wlc-overlay-nav li:nth-child(4) a { transition-delay: 0.34s; }
.wlc-mobile-overlay.is-open .wlc-overlay-nav li:nth-child(5) a { transition-delay: 0.42s; }

.wlc-overlay-nav li a:hover { color: #c8a882; }

.wlc-overlay-tagline {
  position: absolute;
  bottom: 2.5rem;
  left: 2.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(250, 248, 245, 0.3);
}

.wlc-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
  z-index: 1001;
}

.wlc-hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background-color: #1a1a1a;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

.wlc-footer a { transition: color 0.2s ease; }
.wlc-footer a:hover { color: #c8a882 !important; }

.wlc-footer .wp-block-column:last-child {
  text-align: right !important;
}

.wlc-footer .wp-block-column:last-child a {
  justify-content: flex-end !important;
}

/* =============================================
   ANIMERINGAR
   ============================================= */

.wlc-animate {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.wlc-animate.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.wlc-animate:nth-child(2) { transition-delay: 0.10s; }
.wlc-animate:nth-child(3) { transition-delay: 0.20s; }
.wlc-animate:nth-child(4) { transition-delay: 0.30s; }
.wlc-animate:nth-child(5) { transition-delay: 0.40s; }

/* Onepager-fix: HTML-block påverkas aldrig av animeringar */
.wp-block-html,
.wp-block-html * {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}

/* Knappar */
.wp-block-button__link {
  transition: background-color 0.3s ease,
              color 0.3s ease,
              transform 0.25s ease,
              box-shadow 0.3s ease !important;
}

.wp-block-button__link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

/* Bilder */
.wp-block-image img,
.wp-block-gallery .wp-block-image img {
  transition: transform 0.7s ease, filter 0.7s ease;
  will-change: transform;
}

.wp-block-image:hover img,
.wp-block-gallery .wp-block-image:hover img {
  transform: scale(1.04);
  filter: brightness(1.04);
}

/* Separatorer */
.wp-block-separator {
  opacity: 0;
  transition: opacity 1.2s ease;
}

.wp-block-separator.is-visible { opacity: 1; }

/* =============================================
   MOBILANPASSNING
   ============================================= */

@media (max-width: 768px) {

  .wlc-header .wp-block-buttons {
    display: none !important;
  }

  .wlc-header .wp-block-navigation__responsive-container-open {
    display: none !important;
  }

  .wlc-hamburger {
    display: flex !important;
  }

  .wlc-header {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .wp-block-cover h1,
  .hero-section h1 {
    font-size: clamp(1.8rem, 8vw, 2.8rem) !important;
    line-height: 1.25 !important;
  }

  .wp-block-columns {
    flex-direction: column !important;
  }

  .wp-block-column {
    width: 100% !important;
    flex-basis: 100% !important;
  }

  .wlc-footer {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
    padding-top: 2rem !important;
  }

  .wlc-footer .wp-block-column:last-child {
    text-align: left !important;
  }

  .wp-block-button {
    width: 100% !important;
  }

  .wp-block-button__link {
    width: 100% !important;
    text-align: center !important;
  }

  .wp-block-cover {
    background-attachment: scroll !important;
    min-height: 100svh !important;
  }
}

/* =============================================
   RÖRELSEPREFERENS
   ============================================= */

@media (prefers-reduced-motion: reduce) {
  .wlc-animate,
  .wp-block-button__link,
  .wp-block-image img,
  .wp-block-separator,
  .wlc-mobile-overlay,
  .wlc-overlay-nav li a {
    transition: none !important;
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}