/* Hero — editorial. Big name top left, title and city bottom right, and a
   portrait lit by a wash of the accent colour that falls off to black.
   (The previous hero, with the dot matrix and gold sun, is on main.) */

.hero.ed {
  /* the wash follows the site accent, so changing --accent recolours it */
  --c: var(--accent);
  position: relative;
  display: block;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font);
  /* brightest up and left, behind his face, falling off to black on the right
     and at the bottom, then settling into the page colour */
  background:
    radial-gradient(ellipse 75% 95% at 22% 30%,
      color-mix(in srgb, var(--c), #fff 12%) 0%,
      var(--c) 22%,
      color-mix(in srgb, var(--c), #000 45%) 52%,
      color-mix(in srgb, var(--c), #000 82%) 74%,
      transparent 100%),
    linear-gradient(#050608 0%, #040507 60%, var(--bg) 100%);
  /* companion tones made from the accent, for the gradients below: a deeper
     one with the hue turned one way, a lighter one turned the other, and a
     dark shade of the accent itself */
  --c2: oklch(from var(--c) calc(l - .2) calc(c * 1.1) calc(h - 35));
  --c3: oklch(from var(--c) calc(l + .1) c calc(h + 30));
  --cd: oklch(from var(--c) .24 calc(c * .55) h);
}

/* gradient experiments (data-grad on the hero; the colour preview panel
   switches them). Every one stays in colour, no black. Sized in vmax so
   they hold up on phones too */
/* two-tone sweep across the screen */
.hero.ed[data-grad="sweep"] { background: linear-gradient(115deg, var(--c3) 0%, var(--c) 34%, var(--c2) 72%, var(--cd) 100%); }
/* blue and orange. Fixed colours rather than the accent, blended through
   oklch so orange meets blue through warm reds and violets, not grey */
.hero.ed { --or: #ff6a2b; --or-lt: #ffb071; --bl: #2f56ff; --bl-lt: #78a6ff; --bl-dk: #0a1747; }
/* orange top left sweeping to deep blue */
.hero.ed[data-grad="sunset"] { background: linear-gradient(in oklch 120deg, var(--or-lt) 0%, var(--or) 26%, var(--bl) 70%, var(--bl-dk) 100%); }
/* blue sky above, an orange glow rising from the bottom */
.hero.ed[data-grad="horizon"] { background:
  radial-gradient(ellipse 120% 60% at 50% 105%, var(--or) 0%, color-mix(in oklch, var(--or), var(--bl) 40%) 38%, transparent 70%),
  linear-gradient(in oklch 180deg, var(--bl-dk) 0%, var(--bl) 45%, var(--bl-lt) 100%); }
/* orange and blue blobs drifting into each other */
.hero.ed[data-grad="blend"] { background:
  radial-gradient(circle 65vmax at 14% 22%, var(--or-lt), transparent 60%),
  radial-gradient(circle 60vmax at 30% 70%, var(--or), transparent 62%),
  radial-gradient(circle 75vmax at 88% 18%, var(--bl), transparent 64%),
  radial-gradient(circle 70vmax at 82% 96%, var(--bl-lt), transparent 60%),
  var(--bl-dk); }
/* deep blue with one warm orange light behind his head */
.hero.ed[data-grad="glow"] {
  /* toned down: a muted copper glow on deep navy, mixed in oklab so the two
     meet in a dusky plum instead of bright magenta */
  --gl-core: #e3a57e; --gl-or: #c46a3c; --gl-mid: #4b3a63; --gl-bl: #1d3172; --gl-dk: #0b1530;
  background:
    radial-gradient(circle var(--gl-r) at var(--gl-x, 38%) 36%, var(--gl-core) 0%, var(--gl-or) 28%, color-mix(in oklab, var(--gl-or), var(--gl-mid) 70%) 56%, transparent 100%),
    linear-gradient(160deg, var(--gl-bl) 0%, var(--gl-dk) 100%); }

/* grain texture over the hero (data-tex): fine noise blended in, so the
   gradient reads like print or film instead of a flat screen fill */
.hero.ed[data-tex]::before { content: ""; position: absolute; z-index: 3; inset: 0; pointer-events: none;
  opacity: .1; mix-blend-mode: overlay;
  /* grey noise that varies light to dark (overlay ignores flat mid-grey) */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='1.8 0 0 0 -.4  1.8 0 0 0 -.4  1.8 0 0 0 -.4  0 0 0 0 1'/></filter><rect width='100%' height='100%' filter='url(%23g)'/></svg>");
  background-size: 200px; }

/* on the colour gradients he stays whole: no fade on his back, only at the bottom */
.hero.ed[data-grad="sunset"] .ed-me, .hero.ed[data-grad="horizon"] .ed-me, .hero.ed[data-grad="blend"] .ed-me, .hero.ed[data-grad="glow"] .ed-me,
.hero.ed[data-grad="sweep"] .ed-me {
  -webkit-mask-image: linear-gradient(to top, transparent 4%, #000 46%);
          mask-image: linear-gradient(to top, transparent 4%, #000 46%); }
/* soft blobs of the three tones over the dark shade */
.hero.ed[data-grad="mesh"] { background:
  radial-gradient(circle 70vmax at 12% 18%, var(--c3), transparent 62%),
  radial-gradient(circle 60vmax at 62% 8%, var(--c), transparent 60%),
  radial-gradient(circle 80vmax at 92% 92%, var(--c2), transparent 66%),
  var(--cd); }
/* one tone, a bright pool behind his head */
.hero.ed[data-grad="spot"] { background:
  radial-gradient(circle 62vmax at 40% 36%, color-mix(in srgb, var(--c), #fff 18%) 0%, var(--c) 32%, var(--c2) 72%, var(--cd) 100%); }
/* top to bottom, light to deep, like a sky at dusk */
.hero.ed[data-grad="dusk"] { background: linear-gradient(180deg, var(--c3) 0%, var(--c) 42%, var(--c2) 78%, var(--cd) 100%); }

/* the photo darkens into the light (multiply): he reads as a shadowed figure
   against the glow, with the colour falling across his face and going to
   black where the wash does. His back (the right edge) and the bottom fade out */
.ed-me {
  position: absolute; z-index: 2; bottom: 0; left: var(--me-x);
  height: 82%; width: auto; aspect-ratio: 1070 / 2000; transform: translateX(-50%);
  filter: grayscale(1) contrast(1.3) brightness(.78);
  -webkit-mask-image: linear-gradient(to left, transparent 4%, rgb(0 0 0 / .35) 26%, #000 58%), linear-gradient(to top, transparent 4%, #000 46%);
          mask-image: linear-gradient(to left, transparent 4%, rgb(0 0 0 / .35) 26%, #000 58%), linear-gradient(to top, transparent 4%, #000 46%);
  -webkit-mask-composite: source-in; mask-composite: intersect;
  animation: ed-rise 1s .1s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes ed-rise { from { transform: translate(-50%, 4%); opacity: 0; } }
/* the photo is solid, so the name can pass behind him. The colour comes from
   this layer instead: cut to his outline (and the same fades), it multiplies
   copper light over his face and navy over the rest, like the glow behind */
.ed-tint {
  position: absolute; z-index: 2; bottom: 0; left: var(--me-x);
  height: 82%; aspect-ratio: 1070 / 2000; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(circle at 18% 22%, #f0b48c 0%, #c46a3c 26%, #5a4170 52%, #1d3172 78%);
  mix-blend-mode: multiply;
  -webkit-mask-image: url(../images/jason-cutout-upscaled.webp), linear-gradient(to left, transparent 4%, rgb(0 0 0 / .35) 26%, #000 58%), linear-gradient(to top, transparent 4%, #000 46%);
          mask-image: url(../images/jason-cutout-upscaled.webp), linear-gradient(to left, transparent 4%, rgb(0 0 0 / .35) 26%, #000 58%), linear-gradient(to top, transparent 4%, #000 46%);
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  -webkit-mask-composite: source-in, source-in; mask-composite: intersect;
  animation: ed-rise 1s .1s cubic-bezier(.2,.8,.2,1) both;
}
/* where he stays whole (no back fade), so does the tint */
.hero.ed[data-grad="sunset"] .ed-tint, .hero.ed[data-grad="horizon"] .ed-tint, .hero.ed[data-grad="blend"] .ed-tint,
.hero.ed[data-grad="glow"] .ed-tint, .hero.ed[data-grad="sweep"] .ed-tint {
  -webkit-mask-image: url(../images/jason-cutout-upscaled.webp), linear-gradient(to top, transparent 4%, #000 46%);
          mask-image: url(../images/jason-cutout-upscaled.webp), linear-gradient(to top, transparent 4%, #000 46%);
  -webkit-mask-composite: source-in; }

/* fade the bottom of the hero into the page: tall and eased (slow to start,
   solid well before the edge), so the glow and the blue sink into the page
   colour instead of stopping at a line */
.hero.ed::after { content: ""; position: absolute; z-index: 3; inset: auto 0 0 0; height: 55%; pointer-events: none;
  background: linear-gradient(
    color-mix(in srgb, var(--bg) 0%, transparent) 0%,
    color-mix(in srgb, var(--bg) 8%, transparent) 18%,
    color-mix(in srgb, var(--bg) 22%, transparent) 34%,
    color-mix(in srgb, var(--bg) 42%, transparent) 50%,
    color-mix(in srgb, var(--bg) 66%, transparent) 66%,
    color-mix(in srgb, var(--bg) 86%, transparent) 80%,
    var(--bg) 92%); }

/* DM Sans extra-bold (self-hosted, css/fonts.css), always capitals, set tight */
.ed-big { position: absolute; margin: 0; font: 800 clamp(64px, 11.5vw, 220px)/.86 "DM Sans", var(--font);
  letter-spacing: -.06em; text-transform: uppercase; }
/* the name sits behind the photo; its second line steps in, and may tuck
   behind him on narrower screens */
/* the name never meets the photo. Sized as if he stood at 62vw (his nose sits
   about 10% of the screen height left of the photo's centre), "BOURDEAU" with its indent is
   5.24em wide; 6.5 instead of 5.24 keeps it about 80% of the biggest size
   that would still clear him */
.ed-name { z-index: 3; left: clamp(16px, 3vw, 44px); top: max(13vh, 96px);
  font-size: clamp(56px, calc((62vw - 10.3vh - clamp(16px, 3vw, 44px) - 32px) / 6.5), 18vh); }
.ed-name span { display: block; }
.ed-name .n2 { padding-left: .3em; }
.ed-role { z-index: 4; right: clamp(16px, 3vw, 44px); bottom: 8vh; text-align: right; font-size: clamp(40px, 6.4vw, 124px); }

/* phones and portrait tablets: the name fills the width and the title steps
   down, so the two blocks don't compete; the wash is a circle centred near
   his face (an ellipse turns into a tall beam on a narrow screen) */
@media (max-width: 760px), (orientation: portrait) and (max-width: 1100px) {
  .hero.ed { background:
    radial-gradient(circle 150vw at 16% 40%,
      color-mix(in srgb, var(--c), #fff 12%) 0%,
      var(--c) 24%,
      color-mix(in srgb, var(--c), #000 45%) 54%,
      color-mix(in srgb, var(--c), #000 82%) 76%,
      transparent 100%),
    linear-gradient(#050608 0%, #040507 60%, var(--bg) 100%); }
  /* both blocks centred on phones; the name loses its step-in */
  .ed-name { top: 88px; font-size: 13vw; left: 16px; right: 16px; text-align: center; }
  .ed-name .n2 { padding-left: 0; }
  .ed-role { font-size: 10.5vw; bottom: 7vh; left: 16px; right: 16px; text-align: center; }
  .ed-me, .ed-tint { height: 68%; }
}
/* entrance: the glow swells in, he rises (ed-rise), then each line of the
   name and the title slides up from behind its own edge, one after another */
@property --gl-r { syntax: "<length>"; inherits: true; initial-value: 0px; }
.hero.ed { --gl-r: 40vmax; animation: ed-glow 1.6s cubic-bezier(.2,.8,.2,1) both; }
@keyframes ed-glow { from { --gl-r: 22vmax; } }
.ed-ln { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.ed-ln > span { display: block; animation: ed-up .9s cubic-bezier(.2,.8,.2,1) both; }
.n1 > span { animation-delay: .25s; }
.n2 > span { animation-delay: .37s; }
.r1 > span { animation-delay: .6s; }
.r2 > span { animation-delay: .7s; }
@keyframes ed-up { from { transform: translateY(150%); } }  /* far enough to clear the room left under each line for the comma */

/* depth on scroll (js/hero-ed.js sets --p from 0 at the top to 1 once the
   header has scrolled away): the name lifts off faster than the page, he
   lags behind it, and the glow dims under a layer of the page colour */
.ed-name { translate: 0 calc(var(--p, 0) * -18vh); }
.ed-role { translate: 0 calc(var(--p, 0) * -6vh); }
.ed-me, .ed-tint { translate: 0 calc(var(--p, 0) * 14vh); }
.ed-dim { position: absolute; z-index: 1; inset: 0; pointer-events: none; background: var(--bg); opacity: calc(var(--p, 0) * .75); }

@media (prefers-reduced-motion: reduce) {
  .ed-me, .ed-tint, .hero.ed, .ed-ln > span { animation: none; }
}

/* the glow sits behind his head, now that he's centred */
/* he stands at 56vw: about halfway between the end of the name and the
   start of the title */
.hero.ed { --me-x: 56vw; --gl-x: 51%; }
@media (max-width: 760px), (orientation: portrait) and (max-width: 1100px) {
  .hero.ed { --me-x: 50vw; --gl-x: 40%; }
}

/* "See my work" badge, bottom left: the words circle slowly round a peach
   button with a down arrow, and it scrolls to the projects. It arrives last */
.ed-badge { position: absolute; z-index: 4; left: clamp(16px, 3vw, 44px); bottom: 8vh; width: clamp(132px, 12vw, 196px); aspect-ratio: 1;
  display: grid; place-items: center; color: var(--ink); text-decoration: none; border-radius: 50%;
  translate: 0 calc(var(--p, 0) * -6vh);
  animation: ed-badge-in .8s .85s cubic-bezier(.2,.8,.2,1) both; }
@keyframes ed-badge-in { from { opacity: 0; transform: scale(.85) rotate(-40deg); } }
.ed-badge-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; animation: ed-spin 16s linear infinite; }
.ed-badge-ring text { fill: currentColor; font: 800 11.2px "DM Sans", var(--font); letter-spacing: .04em; }
@keyframes ed-spin { to { rotate: 360deg; } }
.ed-badge-dot { width: 46%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--deep); font-size: clamp(16px, 1.4vw, 22px);
  transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s; }
/* the arrow points straight down, to the work below */
.ed-badge-dot .ic { rotate: 90deg; transition: translate .3s cubic-bezier(.2,.8,.2,1); }
.ed-badge:hover .ed-badge-dot, .ed-badge:focus-visible .ed-badge-dot { transform: scale(1.1); box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--accent) 70%, transparent); }
.ed-badge:hover .ed-badge-dot .ic, .ed-badge:focus-visible .ed-badge-dot .ic { translate: 0 3px; }
.ed-badge:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }

/* not on phones */
@media (max-width: 760px), (orientation: portrait) and (max-width: 1100px) {
  .ed-badge { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ed-badge, .ed-badge-ring { animation: none; }
}

