/* Hero stand-in for the v6 family (v6a–v6d). Copied from v6/style.css; real photo replaces .standin later.
   Needs on :root: --stone, --gold, --serif. Needs the #leafy filter + .grain in the page. */

.hero-art { position: relative; margin: 0; aspect-ratio: 3 / 2; width: 100%; }
.standin { position: absolute; inset: 0; overflow: hidden; }
.standin > div { position: absolute; }

/* golden-hour sky and haze */
.sa-sky { inset: 0; background: linear-gradient(178deg, #f1dcad 0%, #ebc489 38%, #d9a565 62%, #b98450 100%); }
.sa-hills {
  left: -5%; right: -5%; top: 30%; height: 30%;
  background: linear-gradient(180deg, #c49466, #a87a52);
  clip-path: polygon(0 55%, 9% 38%, 20% 46%, 33% 22%, 45% 40%, 58% 30%, 70% 48%, 84% 34%, 100% 44%, 100% 100%, 0 100%);
  opacity: .8;
}
/* dry stone terrace: courses and joints */
.sa-terrace {
  left: 0; right: 0; bottom: 0; height: 40%;
  background:
    repeating-linear-gradient(90deg, transparent 0 74px, rgba(60,40,22,.32) 74px 76px),
    repeating-linear-gradient(180deg, #b48b5c 0 30px, #8a6440 30px 33px, #a57d50 33px 62px, #7c5737 62px 65px);
  clip-path: polygon(0 18%, 100% 4%, 100% 100%, 0 100%);
}
/* terracotta roof with panels just below the tree */
.sa-roof {
  left: 30%; width: 46%; bottom: 22%; height: 30%;
  background: linear-gradient(180deg, #b55a3a, #8f4129);
  clip-path: polygon(8% 30%, 92% 18%, 100% 100%, 0 100%);
}
.sa-panels {
  position: absolute; left: 18%; right: 14%; top: 34%; height: 46%;
  background:
    linear-gradient(115deg, transparent 38%, rgba(255,226,160,.42) 48%, transparent 58%),
    repeating-linear-gradient(90deg, transparent 0 calc(16.66% - 2px), rgba(230,210,180,.35) calc(16.66% - 2px) 16.66%),
    repeating-linear-gradient(180deg, transparent 0 calc(50% - 2px), rgba(230,210,180,.35) calc(50% - 2px) 50%),
    linear-gradient(180deg, #2f3540, #1f242c);
  transform: skewX(-8deg);
}
.sa-trunk {
  right: 15%; bottom: 14%; width: 6%; height: 50%;
  background: linear-gradient(90deg, #2a1e14, #4a3524 55%, #24190f);
  clip-path: polygon(30% 0, 70% 0, 62% 40%, 85% 80%, 100% 100%, 0 100%, 22% 78%, 38% 42%);
}
/* the tree's shade falling over roof and terrace */
.sa-shade {
  right: -8%; bottom: -6%; width: 68%; height: 72%;
  background:
    radial-gradient(closest-side at 30% 40%, rgba(20,16,8,.55), transparent),
    radial-gradient(closest-side at 62% 55%, rgba(20,16,8,.6), transparent),
    radial-gradient(closest-side at 80% 30%, rgba(20,16,8,.5), transparent),
    radial-gradient(closest-side at 50% 80%, rgba(20,16,8,.45), transparent);
  filter: url(#leafy);
}
/* faint diagonal light shafts: the "ray" rule over the photo */
.sa-rays {
  inset: 0;
  background: repeating-linear-gradient(118deg, transparent 0 140px, rgba(255,214,130,.22) 140px 141px, transparent 141px 230px);
  mix-blend-mode: screen;
}
.grain {
  inset: 0; opacity: .5; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.8'/></svg>");
}

/* the canopy bleeds off the top-right corner, above the image edge */
.canopy {
  position: absolute; z-index: 2; pointer-events: none;
  right: -4%; top: -22%; width: 44%; height: 74%;
  background:
    radial-gradient(closest-side at 20% 60%, #2f3119 70%, transparent),
    radial-gradient(closest-side at 42% 40%, #353720 72%, transparent),
    radial-gradient(closest-side at 66% 52%, #2a2b15 74%, transparent),
    radial-gradient(closest-side at 82% 30%, #34361d 70%, transparent),
    radial-gradient(closest-side at 52% 74%, #26261a 66%, transparent),
    radial-gradient(closest-side at 30% 28%, #3c3d22 60%, transparent);
  filter: url(#leafy);
}
/* sun breaking through the leaves */
.canopy::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 36% 48%, rgba(255,214,128,.85) 0 3px, transparent 6px),
    radial-gradient(circle at 58% 36%, rgba(255,214,128,.7) 0 2px, transparent 5px),
    radial-gradient(circle at 70% 64%, rgba(255,214,128,.6) 0 2px, transparent 5px),
    radial-gradient(circle at 46% 70%, rgba(255,214,128,.5) 0 2px, transparent 4px);
}

/* stencil caption, set in the tree's shade (local scrim keeps AA whatever photo drops in) */
.shade-caption {
  position: absolute; z-index: 3;
  right: clamp(16px, 5vw, 72px); bottom: 21%;
  width: min(300px, 40%);
  display: grid; gap: 6px;
  padding: 18px 20px;
  color: #f4ecdd;
  background: radial-gradient(120% 120% at 60% 50%, rgba(22,17,9,.62), rgba(22,17,9,.28) 70%, transparent);
}
.shade-caption .stencil { color: #f4ecdd; }
.ratio {
  font: 400 2.5rem/1 var(--serif); font-variant-numeric: tabular-nums lining-nums;
  justify-self: start;
  padding: 2px 6px 4px; margin-left: -6px;
  box-shadow: inset 0 -3px 0 var(--gold);
}
.ratio-say { font-size: .9375rem; line-height: 1.45; }

/* the image's lower edge becomes the next section's ground */
.hero-fade {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 26%; z-index: 2;
  background: linear-gradient(180deg, transparent, var(--stone) 92%);
}

/* dappled carob shade that drifts over sections (static under reduced motion) */
.dappled { position: relative; isolation: isolate; }
.dapple {
  position: absolute; z-index: -1; pointer-events: none;
  left: -10%; right: -10%; top: -160px; height: 620px;
  background-image:
    radial-gradient(ellipse 60px 34px at 12% 20%, rgba(44,36,22,.9), transparent 70%),
    radial-gradient(ellipse 90px 44px at 34% 12%, rgba(44,36,22,.9), transparent 70%),
    radial-gradient(ellipse 50px 30px at 56% 34%, rgba(44,36,22,.9), transparent 70%),
    radial-gradient(ellipse 110px 50px at 78% 18%, rgba(44,36,22,.9), transparent 70%),
    radial-gradient(ellipse 70px 36px at 22% 62%, rgba(44,36,22,.9), transparent 70%),
    radial-gradient(ellipse 80px 40px at 66% 70%, rgba(44,36,22,.9), transparent 70%),
    radial-gradient(ellipse 46px 26px at 90% 56%, rgba(44,36,22,.9), transparent 70%);
  background-size: 640px 360px;
  filter: url(#leafy) blur(1.5px); opacity: .16;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 25%, #000 45%, transparent);
          mask-image: linear-gradient(180deg, transparent, #000 25%, #000 45%, transparent);
  animation: drift 48s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate3d(-48px, 14px, 0) rotate(.6deg); } }

/* phone: 4:5, cropped to tree + roof */
@media (max-width: 720px) {
  .hero-art { aspect-ratio: 4 / 5; }
  .sa-roof { left: 4%; width: 74%; bottom: 20%; height: 26%; }
  .sa-trunk { right: 10%; width: 11%; }
  .sa-hills { top: 26%; }
  .canopy { right: -24%; top: -3%; width: 96%; height: 50%; }
  .shade-caption { left: 16px; right: 16px; width: auto; bottom: 12%; padding: 16px; }
  .ratio { font-size: 2.125rem; }
}

@media (prefers-reduced-motion: reduce) {
  .dapple { animation: none; }
}
