/* ============================================================
   hero.css — HeroSection

   Full-viewport intro with subtext and 3 rotated tile images
   (hands holding paintbrushes) + 3 drip accents.

   Height: 120vh — extra below the fold reveals as user scrolls.
   Background: solid color (--color-surface-warm), no image.
   Navbar is fixed/separate — padding-top clears it.

   Tiles are absolutely positioned, overflow hidden clips the
   hands that extend beyond the viewport edges.

   Animations (slide-in, bob) added in Step 10.
   ============================================================ */


/* ============================================================
   Section container
   ============================================================ */

.hero {
  position: relative;
  width: 100%;
  min-height: 105vh;
  background: var(--color-surface-bold);
  overflow: hidden;
}

/* Organic background layers — 3 concentric circles (sunset effect)
   All horizontally centered, stacked with smallest on top.
   transform: translate(-50%, 50%) centers horizontally AND
   shifts down by half-height so `bottom` refers to the circle's center. */
.hero__layer {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  left: 50%;
  transform: translate(-50%, 50%);
  filter: drop-shadow(var(--shadow-divider));
}

.hero__layer--1 {  /* front, smallest — center 20vh from bottom */
  z-index: 0;
  background-color: var(--color-clay-510);
  width: 150vw;
  height: 150vw;
  bottom: 20vh;
}

.hero__layer--2 {  /* middle — center 45vh from bottom */
  z-index: 0;
  background-color: var(--color-clay-505);
  width: 180vw;
  height: 180vw;
  bottom: 45vh;
}

.hero__layer--3 {  /* back, largest — center 65vh from bottom */
  z-index: 0;
  background-color: var(--color-clay-502);
  width: 200vw;
  height: 200vw;
  bottom: 65vh;
}

/* Tablet breakpoint */
@media (max-width: 1199px) and (min-width: 768px) {
  .hero__layer--1 {  /* front, smallest — center -20vh from bottom */
    width: 150vw;
    height: 150vw;
    bottom: -20vh;
  }
  .hero__layer--2 {  /* middle — center -3vh from bottom */
    width: 180vw;
    height: 180vw;
    bottom: -3vh;
  }
  .hero__layer--3 {  /* back, largest — center 10vh from bottom */
    width: 200vw;
    height: 200vw;
    bottom: 10vh;
  }
}

/* Desktop breakpoint */
@media (min-width: 1200px) {
  .hero__layer--1 {  /* front, smallest — center -93vh from bottom */
    width: 150vw;
    height: 150vw;
    bottom: -93vh;
  }
  .hero__layer--2 {  /* middle — center -80vh from bottom */
    width: 180vw;
    height: 180vw;
    bottom: -80vh;
  }
  .hero__layer--3 {  /* back, largest — center -65vh from bottom */
    width: 200vw;
    height: 200vw;
    bottom: -65vh;
  }
}


/* ============================================================
   Subtext — "Pop-up pottery workshops…"
   Avance Pro Regular, type-size-h2 (40px desktop, 24px mobile).
   Desktop: left-aligned, max-width 554px.
   Tablet: centred, max-width 554px.
   Mobile: centred, fluid width.
   ============================================================ */

.hero__subtext {
  position: relative;
  z-index: 2;
  padding: var(--space-layout-xl) var(--space-layout-2xl);
  /* Clear the fixed navbar: 70px navbar + layout-xl top padding */
  padding-top: calc(70px + var(--space-layout-xl));
}

.hero__subtext-text {
  font-family: var(--type-family-body);
  font-size: var(--type-size-h2);
  font-weight: var(--type-weight-regular);
  line-height: 1;
  color: var(--color-text-default);
  width: 554px;
  max-width: 100%;
  margin: 0;
}

/* Desktop: left-aligned */
@media (min-width: 1200px) {
  .hero__subtext-text {
    text-align: left;
  }
}

/* Tablet: centred */
@media (max-width: 1199px) and (min-width: 768px) {
  .hero__subtext {
    display: flex;
    justify-content: center;
  }
  .hero__subtext-text {
    text-align: center;
  }
}

/* Mobile: centred, fluid width */
@media (max-width: 767px) {
  .hero__subtext {
    display: flex;
    justify-content: center;
    padding-top: calc(65px + var(--space-layout-xl));
  }
  .hero__subtext-text {
    width: auto;
    flex: 1;
    text-align: center;
  }
}


/* ============================================================
   Tiles — 3 absolutely positioned hand/brush images
   Each has: position, size, rotation per breakpoint.
   filter: drop-shadow for tile shadow.
   ============================================================ */

.hero__tiles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero__tile {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  filter: drop-shadow(var(--shadow-tile));
}

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


/* ── Ultra-wide tile positions (≥ 2800px) ── */

.hero__tile--be-creative {
  right: -400px;
  top: -500px;
  width: 2237px;
  --tile-end-rotation: -9.84deg;
}

.hero__tile--get-together {
  left: -343px;
  top: 200px;
  width: 2354px;
  --tile-end-rotation: -5.36deg;
}

.hero__tile--make-memories {
  right: -600px;
  top: 500px;
  width: 2362px;
  --tile-end-rotation: -1.17deg;
}


/* ── Large desktop tile positions (2400–2799px) ── */

@media (max-width: 2799.9px) and (min-width: 2400px) {
  .hero__tile--be-creative {
    right: -300px;
    top: -450px;
    width: 2000px;
    --tile-end-rotation: -9.84deg;
  }

  .hero__tile--get-together {
    left: -343px;
    top: 270px;
    width: 2100px;
    --tile-end-rotation: -5.36deg;
  }

  .hero__tile--make-memories {
    right: -450px;
    top: 500px;
    width: 2000px;
    --tile-end-rotation: -1.17deg;
  }
}


/* ── Medium-large desktop tile positions (2000–2399px) ── */

@media (max-width: 2399.9px) and (min-width: 2000px) {
  .hero__tile--be-creative {
    right: -250px;
    top: -380px;
    width: 1750px;
    --tile-end-rotation: -9.84deg;
  }

  .hero__tile--get-together {
    left: -343px;
    top: 250px;
    width: 1850px;
    --tile-end-rotation: -5.36deg;
  }

  .hero__tile--make-memories {
    right: -450px;
    top: 480px;
    width: 1760px;
    --tile-end-rotation: -1.17deg;
  }
}


/* ── Desktop tile positions (1600–1999px) ── */

@media (max-width: 1999.9px) and (min-width: 1600px) {
  .hero__tile--be-creative {
    right: -200px;
    top: -236px;
    width: 1387px;
    --tile-end-rotation: -9.84deg;
  }

  .hero__tile--get-together {
    left: -343px;
    top: 274px;
    width: 1504px;
    --tile-end-rotation: -5.36deg;
  }

  .hero__tile--make-memories {
    right: -400px;
    top: 445px;
    width: 1512px;
    --tile-end-rotation: -1.17deg;
  }
}


/* ── Small desktop tile positions (1200–1599px) ── */

@media (max-width: 1599.9px) and (min-width: 1200px) {
  .hero__tile--be-creative {
    right: -180px;
    top: -220px;
    width: 1150px;
    --tile-end-rotation: -9.5deg;
  }

  .hero__tile--get-together {
    left: -300px;
    top: 194px;
    width: 1250px;
    --tile-end-rotation: -5.36deg;
  }

  .hero__tile--make-memories {
    right: -335px;
    top: 320px;
    width: 1150px;
    --tile-end-rotation: -1.17deg;
  }
}


/* ── Tablet tile positions (768–1199px) ── */

@media (max-width: 1199px) and (min-width: 768px) {
  .hero__tile--be-creative {
    right: -320px;
    top: 30px;
    width: 988px;
    --tile-end-rotation: 3.2deg;
  }

  .hero__tile--get-together {
    left: -342px;
    top: 411px;
    width: 981px;
    --tile-end-rotation: -5.36deg;
  }

  .hero__tile--make-memories {
    right: -280px;
    top: 619px;
    width: 918px;
    --tile-end-rotation: -1.17deg;
  }
}


/* ── Mobile tile positions (< 768px) ── */

@media (max-width: 767px) {
  .hero__tile--be-creative {
    right: -160px;
    top: 48px;
    width: 535px;
    --tile-end-rotation: -3.85deg;
  }

  .hero__tile--get-together {
    left: -200px;
    top: 279px;
    width: 583px;
    --tile-end-rotation: -5.36deg;
  }

  .hero__tile--make-memories {
    right: -210px;
    top: 457px;
    width: 586px;
    --tile-end-rotation: -1.17deg;
  }
}


/* ── Hero loading state — tiles + subtext hidden until JS animates them in ── */

.hero--loading .hero__tile,
.hero--loading .hero__drip,
.hero--loading .hero__subtext {
  visibility: hidden;
}

/* Reduced motion: skip entrance animation, show resting state immediately */
@media (prefers-reduced-motion: reduce) {
  .hero__tile {
    transform: rotate(var(--tile-end-rotation, 0deg)) !important;
    visibility: visible !important;
  }
  .hero__drip {
    visibility: visible !important;
  }
  .hero__subtext {
    visibility: visible !important;
    opacity: 1 !important;
  }
}


/* ============================================================
   Drips — 3 small paint drip accents
   Positioned near each tile's brush tip.
   ============================================================ */

.hero__drip {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  visibility: hidden;
}

.hero__drip img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(var(--shadow-tile));
}


/* ── Ultra-wide drip positions (≥ 2800px) ── */

.hero__drip--be-creative {
  right: 1774px;
  top: 570px;
  width: 55px;
}

.hero__drip--get-together {
  left: 1980px;
  top: 805px;
  width: 55px;
}

.hero__drip--make-memories {
  right: 1729px;
  top: 1290px;
  width: 55px;
}


/* ── Large desktop drip positions (2400–2799px) ── */

@media (max-width: 2799px) and (min-width: 2400px) {
  .hero__drip--be-creative {
    right: 1641px;
    top: 506px;
    width: 50px;
  }

  .hero__drip--get-together {
    left: 1730px;
    top: 810px;
    width: 50px;
  }

  .hero__drip--make-memories {
    right: 1520px;
    top: 1170px;
    width: 50px;
  }
}


/* ── Medium-large desktop drip positions (2000–2399px) ── */

@media (max-width: 2399px) and (min-width: 2000px) {
  .hero__drip--be-creative {
    right: 1448px;
    top: 457px;
    width: 48px;
  }

  .hero__drip--get-together {
    left: 1480px;
    top: 726px;
    width: 48px;
  }

  .hero__drip--make-memories {
    right: 1280px;
    top: 1073px;
    width: 48px;
  }
}


/* ── Desktop drip positions (1600–1999px) ── */

@media (max-width: 1999px) and (min-width: 1600px) {
  .hero__drip--be-creative {
    right: 1043px;
    top: 427px;
    width: 45px;
  }

  .hero__drip--get-together {
    left: 1135px;
    top: 661px;
    width: 45px;
  }

  .hero__drip--make-memories {
    right: 1085px;
    top: 0955px;
    width: 45px;
  }
}


/* ── Small desktop drip positions (1200–1599px) ── */

@media (max-width: 1599px) and (min-width: 1200px) {
  .hero__drip--be-creative {
    right: 827px;
    top: 356px;
    width: 30px;
  }

  .hero__drip--get-together {
    left: 934px;
    top: 515px;
    width: 30px;
  }

  .hero__drip--make-memories {
    right: 796px;
    top: 707px;
    width: 30px;
  }
}


/* ── Tablet drip positions (768–1199px) ── */

@media (max-width: 1199px) and (min-width: 768px) {
  .hero__drip--be-creative {
    right: 663px;
    top: 460px;
    width: 30px;
  }

  .hero__drip--get-together {
    left: 623px;
    top: 733px;
    width: 31px;
  }

  .hero__drip--make-memories {
    right: 621px;
    top: 998px;
    width: 30px;
  }
}


/* ── Mobile drip positions (< 768px) ── */

@media (max-width: 767px) {
  .hero__drip--be-creative {
    right: 367px;
    top: 277px;
    width: 17px;
  }

  .hero__drip--get-together {
    left: 375px;
    top: 430px;
    width: 18px;
  }

  .hero__drip--make-memories {
    right: 367px;
    top: 655px;
    width: 18px;
  }
}


/* ============================================================
   Drip positions INSIDE tiles (after JS reparenting)

   When JS moves drips inside their tiles, these rules override
   the section-relative positions above (higher specificity).
   Values are pre-computed using inverse rotation math so drips
   appear at the brush tip after the tile's rotation is applied.
   ============================================================ */

.hero__tile .hero__drip {
  right: auto;   /* disable any section-relative right positioning */
}

/* ── Ultra-wide (≥ 2800px) ── */

.hero__tile--be-creative .hero__drip--be-creative {
  left: -12.4px;  top: 1015.8px;  width: 55px;
}
.hero__tile--get-together .hero__drip--get-together {
  left: 2315.9px;  top: 714.5px;  width: 55px;
}
.hero__tile--make-memories .hero__drip--make-memories {
  left: -25px;  top: 766px;  width: 55px;
}

/* ── Large desktop (2400–2799px) ── */

@media (max-width: 2799px) and (min-width: 2400px) {
  .hero__tile--be-creative .hero__drip--be-creative {
    left: -9.3px;  top: 907.7px;  width: 50px;
  }
  .hero__tile--get-together .hero__drip--get-together {
    left: 2066.5px;  top: 637.8px;  width: 50px;
  }
  .hero__tile--make-memories .hero__drip--make-memories {
    left: -22.6px;  top: 649.7px;  width: 50px;
  }
}

/* ── Medium-large desktop (2000–2399px) ── */

@media (max-width: 2399px) and (min-width: 2000px) {
  .hero__tile--be-creative .hero__drip--be-creative {
    left: -12.2px;  top: 794.6px;  width: 48px;
  }
  .hero__tile--get-together .hero__drip--get-together {
    left: 1817px;  top: 562px;  width: 48px;
  }
  .hero__tile--make-memories .hero__drip--make-memories {
    left: -20.5px;  top: 575.1px;  width: 48px;
  }
}

/* ── Desktop (1600–1999px) ── */

@media (max-width: 1999px) and (min-width: 1600px) {
  .hero__tile--be-creative .hero__drip--be-creative {
    left: -12.2px;  top: 631.3px;  width: 45px;
  }
  .hero__tile--get-together .hero__drip--get-together {
    left: 1472.6px;  top: 456.8px;  width: 45px;
  }
  .hero__tile--make-memories .hero__drip--make-memories {
    left: -20.2px;  top: 494.6px;  width: 45px;
  }
}

/* ── Small desktop (1200–1599px) ── */

@media (max-width: 1599px) and (min-width: 1200px) {
  .hero__tile--be-creative .hero__drip--be-creative {
    left: -3.8px;  top: 522.4px;  width: 30px;
  }
  .hero__tile--get-together .hero__drip--get-together {
    left: 1230.2px;  top: 379.2px;  width: 30px;
  }
  .hero__tile--make-memories .hero__drip--make-memories {
    left: -12.6px;  top: 375.3px;  width: 30px;
  }
}

/* ── Tablet (768–1199px) ── */

@media (max-width: 1199px) and (min-width: 768px) {
  .hero__tile--be-creative .hero__drip--be-creative {
    left: -6.8px;  top: 447.9px;  width: 30px;
  }
  .hero__tile--get-together .hero__drip--get-together {
    left: 961.4px;  top: 297.7px;  width: 31px;
  }
  .hero__tile--make-memories .hero__drip--make-memories {
    left: -14.4px;  top: 299.7px;  width: 30px;
  }
}

/* ── Mobile (< 768px) ── */

@media (max-width: 767px) {
  .hero__tile--be-creative .hero__drip--be-creative {
    left: -4.1px;  top: 243.6px;  width: 17px;
  }
  .hero__tile--get-together .hero__drip--get-together {
    left: 572.8px;  top: 178.3px;  width: 18px;
  }
  .hero__tile--make-memories .hero__drip--make-memories {
    left: -9.9px;  top: 192px;  width: 18px;
  }
}


/* ── Clone drips (fall phase) ──
   Clones are appended to .hero with inline positioning.
   Override any inherited tile-relative rules. */

.hero__drip--clone {
  right: auto !important;
  left: auto;
  top: auto;
  pointer-events: none;
}
