/* =============================================================================
   Homepage — Willowbound Child Theme

   Loaded only on the front page (is_front_page() in functions.php).
   Sections: Hero · About snippet · Find Us teaser · Social CTA
   ============================================================================= */


/* ---------------------------------------------------------------------------
   Hero — @property for animatable gradient
   --------------------------------------------------------------------------- */

@property --hero-glow-opacity {
  syntax: '<number>';
  inherits: false;
  initial-value: 0.17;
}

@property --hero-glow-x {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 50%;
}

@property --hero-glow-y {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 28%;
}

@keyframes hero-breathe {
  0%, 100% { --hero-glow-opacity: 0.13; }
  50%      { --hero-glow-opacity: 0.24; }
}


/* ---------------------------------------------------------------------------
   Hero section
   --------------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-deep-forest);
  background-image:
    var(--grain-dark),
    radial-gradient(ellipse 60% 50% at var(--hero-glow-x) var(--hero-glow-y),
      oklch(0.55 0.09 78 / var(--hero-glow-opacity)) 0%, transparent 70%),
    radial-gradient(ellipse 65% 55% at 20% 85%, oklch(0.22 0.06 152 / 0.22) 0%, transparent 60%);
  background-size: 200px 200px, auto, auto;
  animation: hero-breathe 7s ease-in-out infinite;
  padding-block:
    calc(var(--header-height) + var(--space-3xl))
    var(--space-3xl);
}

/* Botanical wrapper — carries the parallax transform */
.hero__botanical {
  position: absolute;
  top: 0; right: 0;
  width: clamp(200px, 36vw, 420px);
  aspect-ratio: 1 / 1;
  pointer-events: none;
  user-select: none;
  will-change: transform;
  transition: transform 1.2s ease-out;
}

/* Willow illustration — PNG masked to Cream Linen, subtle sway */
.hero__botanical-willow {
  position: absolute;
  inset: 0;
  background-color: var(--color-cream-linen);
  -webkit-mask: url('../images/willow-lineart.png') no-repeat center / contain;
          mask: url('../images/willow-lineart.png') no-repeat center / contain;
  opacity: 0.16;
  transform-origin: 50% 95%;
  animation: willow-sway 11s ease-in-out infinite;
}

@keyframes willow-sway {
  0%, 100% { transform: rotate(-0.45deg) scale(1.004); }
  50%      { transform: rotate( 0.45deg) scale(0.997); }
}

/* Firefly canvas — sits on top of the willow */
.hero__botanical-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Second botanical — bottom-left echo, horizontally mirrored */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -20px;
  width: clamp(120px, 22vw, 300px);
  aspect-ratio: 480 / 320;
  background-image: var(--botanical-svg);
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.05;
  pointer-events: none;
  transform: scaleX(-1);
}

.hero__inner {
  position: relative;
  z-index: 1;
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-lg);
  max-width: 800px;
  margin-inline: auto;
}

/* Entry animations */
@keyframes hero-fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero__eyebrow {
  font-family:    var(--font-body);
  font-size:      var(--text-sm);
  font-weight:    var(--weight-light);
  font-style:     italic;
  letter-spacing: var(--tracking-wider);
  color:          var(--color-cream-linen);
  opacity: 0.6;
  margin: 0;
  max-width: none;
  animation: hero-fade-up var(--duration-enter) var(--ease-out-quart) 0.1s both;
}

.hero__title {
  font-family:    var(--font-display);
  font-size:      var(--text-display);
  font-weight:    var(--weight-bold);
  line-height:    var(--leading-display);
  letter-spacing: var(--tracking-display);
  color:          var(--color-cream-linen) !important;
  margin: 0;
  max-width: none;
  text-shadow:
    0 0 80px  rgba(242, 200, 100, 0.18),
    0 0 160px rgba(242, 200, 100, 0.10);
  animation: hero-fade-up var(--duration-enter) var(--ease-out-quart) 0.3s both;
}

.hero__cta {
  animation: hero-fade-up var(--duration-enter) var(--ease-out-quart) 0.7s both;
}


/* ---------------------------------------------------------------------------
   Rotating tagline
   --------------------------------------------------------------------------- */

.tagline-rotator {
  display: grid;
  min-height: calc(var(--text-accent) * var(--leading-accent) * 2);
  animation: hero-fade-up var(--duration-enter) var(--ease-out-quart) 0.5s both;
}

.tagline-line {
  grid-area: 1 / 1;
  font-size: var(--text-accent);
  color: var(--color-cream-linen);
  text-align: center;
  opacity: 0;
  transform: translateY(0);
  will-change: opacity, transform;
}

.tagline-line.is-active { opacity: 1; }

.tagline-line--italic {
  font-family:  var(--font-body);
  font-style:   italic;
  font-weight:  var(--weight-light);
  line-height:  var(--leading-normal);
}

@media (prefers-reduced-motion: reduce) {
  .tagline-line:not(:first-child) { display: none; }
  .tagline-line:first-child        { opacity: 1; }
}


/* Scroll indicator */
.hero__scroll-indicator {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-cream-linen);
  opacity: 0.35;
  animation:
    hero-fade-up var(--duration-enter) var(--ease-out-quart) 1.2s both,
    scroll-bounce 2.8s var(--ease-in-out) 2s infinite;
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0);   opacity: 0.35; }
  50%       { transform: translateX(-50%) translateY(8px); opacity: 0.55; }
}


/* ---------------------------------------------------------------------------
   About snippet — cream linen, editorial two-column on desktop
   --------------------------------------------------------------------------- */

.section-about {
  position: relative;
  background-color: var(--color-cream-linen);
  background-image: var(--grain-light);
  background-size: 200px 200px;
  padding-block: var(--space-3xl) var(--space-2xl);
}

/* Torn-paper transition from the hero */
.section-about::before {
  content: '';
  position: absolute;
  top: -56px;
  left: 0;
  right: 0;
  height: 56px;
  background-color: var(--color-cream-linen);
  background-image: var(--grain-light);
  background-size: 200px 200px;
  pointer-events: none;
  z-index: 2;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 56' preserveAspectRatio='none'%3E%3Cpath d='M 0,36 C 90,10 200,48 310,24 C 410,12 530,50 650,30 C 750,48 860,16 970,34 C 1080,50 1190,12 1310,32 C 1380,46 1440,28 1440,28 L 1440,56 L 0,56 Z' fill='black'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 56' preserveAspectRatio='none'%3E%3Cpath d='M 0,36 C 90,10 200,48 310,24 C 410,12 530,50 650,30 C 750,48 860,16 970,34 C 1080,50 1190,12 1310,32 C 1380,46 1440,28 1440,28 L 1440,56 L 0,56 Z' fill='black'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%;
          mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
}

.section-about__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

@media (min-width: 900px) {
  .section-about__inner {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: var(--space-2xl);
    align-items: center;
  }
}

.section-about__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: flex-start;
}

@media (max-width: 899px) {
  .section-about__text {
    align-items: center;
    text-align: center;
  }
}

.section-about__eyebrow {
  font-family:    var(--font-body);
  font-size:      var(--text-xs);
  font-weight:    var(--weight-bold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color:          var(--color-walnut-brown);
  opacity: 0.65;
  margin: 0;
  max-width: none;
}

.section-about__heading {
  font-family:    var(--font-display);
  font-size:      var(--text-xl);
  font-weight:    var(--weight-bold);
  line-height:    var(--leading-snug);
  letter-spacing: var(--tracking-heading);
  color:          var(--color-deep-forest);
  margin: 0;
  max-width: none;
}

.section-about__body {
  font-size:   var(--text-base);
  line-height: var(--leading-relaxed);
  color:       var(--color-near-black);
  max-width: 52ch;
}

@media (max-width: 899px) {
  .section-about__body { margin-inline: auto; }
}

.section-about__inline-quote {
  font-family: var(--font-accent);
  font-size:   clamp(1.4rem, 2vw + 0.75rem, 2rem);
  line-height: 1.4;
  color:       var(--color-walnut-brown);
  opacity:     0.65;
  margin:      0;
  max-width:   none;
  padding-left: var(--space-md);
  border-left:  1px solid rgba(89, 54, 34, 0.3);
}

@media (max-width: 899px) {
  .section-about__inline-quote {
    border-left: none;
    padding-left: 0;
    text-align: center;
  }
}

.section-about__image-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  background-color: oklch(0.88 0.04 80);
  border: 1px solid rgba(89, 54, 34, 0.2);
  overflow: hidden;
  transform: rotate(0.6deg);
  align-self: stretch;
}

.section-about__image-frame::before {
  content: 'Willowbound';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-5deg);
  font-family: var(--font-accent);
  font-size:   clamp(2.5rem, 5vw, 4.5rem);
  color:       var(--color-walnut-brown);
  opacity:     0.12;
  pointer-events: none;
  white-space: nowrap;
  line-height: 1;
}

.section-about__image-frame::after {
  content: '';
  position: absolute;
  inset: var(--space-sm);
  border: 1px solid rgba(89, 54, 34, 0.14);
  pointer-events: none;
}

.section-about__image-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: var(--space-md);
  z-index: 1;
}

.section-about__image-label {
  font-family:    var(--font-body);
  font-size:      var(--text-xs);
  font-style:     italic;
  letter-spacing: var(--tracking-wider);
  color:          var(--color-walnut-brown);
  opacity:        0.75;
}

@media (max-width: 899px) {
  .section-about__image-frame {
    order: -1;
    max-width: 280px;
    margin-inline: auto;
  }
}


/* ---------------------------------------------------------------------------
   Find Us teaser — Willow Green section
   --------------------------------------------------------------------------- */

.section-events {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-3xl) var(--space-2xl);
  background-image: var(--grain-dark);
  background-size: 200px 200px;
}

.section-events::after {
  content: '';
  position: absolute;
  bottom: -20px;
  right: -10px;
  width: clamp(140px, 22vw, 260px);
  aspect-ratio: 480 / 320;
  background-image: var(--botanical-svg);
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.07;
  pointer-events: none;
  transform: rotate(180deg) scaleX(-1);
}

.section-events__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  align-items: flex-start;
}

@media (max-width: 767px) {
  .section-events__inner {
    align-items: center;
    text-align: center;
  }
}

.section-events__header {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.section-events__eyebrow {
  font-family:    var(--font-body);
  font-size:      var(--text-xs);
  font-weight:    var(--weight-bold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color:          var(--color-cream-linen);
  opacity: 0.55;
  margin: 0;
  max-width: none;
}

.section-events__heading {
  font-family:    var(--font-display);
  font-size:      var(--text-xl);
  font-weight:    var(--weight-bold);
  line-height:    var(--leading-snug);
  letter-spacing: var(--tracking-heading);
  color:          var(--color-cream-linen);
  margin: 0;
  max-width: none;
}

.events-placeholder {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: inherit;
}

.events-placeholder__message {
  font-style: italic;
  color:      var(--color-cream-linen);
  opacity:    0.75;
  max-width:  46ch;
  margin:     0;
}

.events-divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  width: 100%;
  max-width: 280px;
  opacity: 0.3;
}

@media (max-width: 767px) {
  .events-divider { margin-inline: auto; }
}

.events-divider__rule {
  flex: 1;
  height: 1px;
  background-color: var(--color-cream-linen);
}

.events-divider__motif {
  font-size: 0.55rem;
  color: var(--color-cream-linen);
  flex-shrink: 0;
  line-height: 1;
}


/* ---------------------------------------------------------------------------
   Social CTA — ghost "Wander" watermark
   --------------------------------------------------------------------------- */

.section-social {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-3xl);
}

@keyframes wander-drift {
  0%, 100% { transform: translate(-50%, -50%) rotate(-8deg) translateX(0); }
  50%       { transform: translate(-50%, -50%) rotate(-8deg) translateX(18px); }
}

.section-social::before {
  content: 'Wander';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  font-family: var(--font-accent);
  font-size: clamp(8rem, 22vw, 18rem);
  line-height: 1;
  color: var(--color-cream-linen);
  opacity: 0.04;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  z-index: 0;
  animation: wander-drift 28s ease-in-out infinite;
}

.section-social__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-lg);
  max-width: 600px;
  margin-inline: auto;
}

.section-social__heading {
  font-family:    var(--font-display);
  font-size:      var(--text-xl);
  font-weight:    var(--weight-bold);
  font-style:     italic;
  line-height:    var(--leading-snug);
  letter-spacing: var(--tracking-heading);
  color:          var(--color-cream-linen);
  margin: 0;
  max-width: none;
}

.section-social__lead {
  color:       var(--color-cream-linen);
  opacity:     0.75;
  font-size:   var(--text-md);
  line-height: var(--leading-loose);
  max-width:   44ch;
  margin:      0;
}

.section-social__buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
}

@media (min-width: 480px) {
  .section-social__buttons { gap: var(--space-lg); }
}

.section-social__ornament {
  font-size:     0.55rem;
  color:         var(--color-cream-linen);
  opacity:       0.3;
  line-height:   1;
  display:       block;
  margin-top:    calc(-1 * var(--space-xs));
}

.section-social__sign-off {
  font-family: var(--font-accent);
  font-size:   clamp(1.25rem, 2vw + 0.5rem, 1.75rem);
  color:       var(--color-cream-linen);
  opacity:     0.72;
  margin:      0;
  max-width:   none;
  line-height: var(--leading-accent);
}
