/* =====================================================================
   The artist: Mary Roberts
   Sea backdrop, drifting smoke, load fog, scroll veils, porthole video.
   Uses the site's existing tokens (--bg, --ink, --lamp, --display...).
   ===================================================================== */

.artist{
  position:relative;
  isolation:isolate;
  clip-path:inset(0);           /* keeps the fixed sea, smoke and grain inside this area */
  background:var(--bg-3);
  color:var(--ink);
  --dim:.35;
}

/* ---------- the grey sea, fixed behind everything ---------- */
.artist-sea{position:fixed; inset:0; z-index:-4; pointer-events:none}
.artist-sea img{width:100%; height:100%; object-fit:cover; object-position:50% 62%}
.artist-sea::before,
.artist-sea::after{content:""; position:absolute; inset:0}
.artist-sea::before{
  background:
    radial-gradient(130% 95% at 50% 42%, rgba(8,20,25,0) 35%, rgba(8,20,25,.9) 100%),
    linear-gradient(180deg, rgba(8,20,25,.7) 0%, rgba(8,20,25,0) 32%, rgba(8,20,25,0) 70%, rgba(8,20,25,.85) 100%);
}
.artist-sea::after{background:var(--bg-3); opacity:var(--dim); transition:opacity .6s linear}

/* ---------- smoke drifting over the water: the story page's own .mist layers ---------- */
.artist-smoke{position:fixed; inset:0; z-index:-3; pointer-events:none; overflow:hidden}
.artist-smoke .mist-a{top:auto; bottom:-12%; height:62%; opacity:.34; animation-duration:140s}
.artist-smoke .mist-b{top:-10%; height:48%; opacity:.18; animation-duration:110s}

/* film grain, the same texture as the story scenes */
.artist-grain{
  position:fixed; inset:-60px; z-index:6; pointer-events:none;
  background:url("/images/fx/grain.png"); opacity:.085; mix-blend-mode:overlay;
  animation:artist-grain .9s steps(6) infinite;
}
@keyframes artist-grain{
  0%{transform:translate(0,0)} 20%{transform:translate(-22px,14px)} 40%{transform:translate(18px,-26px)}
  60%{transform:translate(-30px,-8px)} 80%{transform:translate(12px,28px)} 100%{transform:translate(0,0)}
}

/* ---------- scroll veils: smoke that parts as each chapter arrives ---------- */
.artist-chapter{position:relative; --p:1}
.veil{position:absolute; left:0; right:0; top:0; height:min(60vh,540px); pointer-events:none; z-index:4; overflow:hidden}
.veil i{
  position:absolute; top:0; height:100%; width:75%; display:block;
  background:url("/images/fx/mist-a.webp") repeat-x 0 50% / auto 100%;
  opacity:calc((1 - var(--p)) * .9);
}
.veil i:first-child{left:-10%; transform:translate3d(calc(var(--p) * -60%),0,0)}
.veil i:last-child{right:-10%; background-image:url("/images/fx/mist-b.webp"); transform:translate3d(calc(var(--p) * 60%),0,0) scaleX(-1)}

/* the sea fades into the footer instead of stopping at a hard edge */
.artist::after{content:""; position:absolute; left:0; right:0; bottom:0; height:min(45vh,420px); z-index:-1; pointer-events:none;
  background:linear-gradient(180deg, rgba(8,20,25,0), var(--bg-3) 92%)}

/* ---------- layout ---------- */
.artist .wrap{position:relative; z-index:3}
.artist-hero{min-height:min(100svh,980px); display:grid; align-items:center; padding-block:clamp(3rem,7vw,6rem)}
.artist-hero-grid{display:grid; grid-template-columns:minmax(0,5fr) minmax(0,6fr); gap:clamp(2rem,5vw,5rem); align-items:center}
.artist-hero h1{font-size:clamp(3.6rem,8.4vw,7.6rem); line-height:.9; letter-spacing:-.015em; text-shadow:0 2px 30px rgba(8,20,25,.8)}
.artist-hero h1 span{display:block}
.artist-hero .subtitle{font-family:var(--display); font-style:italic; font-size:clamp(1.6rem,2.8vw,2.4rem); color:var(--lamp); margin:.6rem 0 1.6rem; line-height:1.15}
.artist-hero .lede{max-width:36ch; text-shadow:0 1px 18px rgba(8,20,25,.9)}

/* the porthole */
.porthole{margin:0; display:grid; justify-items:center; gap:1.25rem}
.porthole-bezel{
  position:relative; width:min(100%,600px); aspect-ratio:1; border-radius:50%;
  padding:6.2%;
  background:
    radial-gradient(circle at 50% 50%, transparent 66%, rgba(0,0,0,.55) 69%, transparent 72%),
    conic-gradient(from 210deg, #4b5559, #c9d0d1 8%, #6e787b 18%, #e7ecec 30%, #59646a 42%, #aab4b6 55%, #3f484c 66%, #d3d9da 78%, #6c767a 90%, #4b5559);
  box-shadow:
    0 0 0 1px rgba(0,0,0,.6),
    0 30px 80px rgba(0,0,0,.6),
    0 0 120px rgba(92,203,232,.16),
    inset 0 2px 1px rgba(255,255,255,.35),
    inset 0 -3px 6px rgba(0,0,0,.55);
}
.porthole-bezel::before{ /* slow breathing glow behind the glass */
  content:""; position:absolute; inset:-14%; border-radius:50%; z-index:-1;
  background:radial-gradient(circle, rgba(92,203,232,.28) 0%, rgba(92,203,232,.08) 45%, transparent 68%);
}
.porthole-glass{position:relative; width:100%; height:100%; border-radius:50%; overflow:hidden; background:var(--bg-3); box-shadow:inset 0 0 0 3px rgba(8,20,25,.9)}
.porthole-glass video,
.porthole-glass img{position:absolute; inset:0; width:100%; height:100%; object-fit:cover; transform:scale(1.06)}
.porthole-glass::after{ /* glass: rim tint and a cold reflection */
  content:""; position:absolute; inset:0; border-radius:50%; pointer-events:none;
  background:
    radial-gradient(120% 60% at 28% 8%, rgba(220,240,246,.22), rgba(220,240,246,0) 46%),
    radial-gradient(circle, rgba(92,203,232,0) 58%, rgba(92,203,232,.22) 86%, rgba(8,20,25,.7) 100%);
  box-shadow:inset 0 0 40px rgba(8,20,25,.65);
}
.screw{
  position:absolute; width:5.4%; aspect-ratio:1; border-radius:50%;
  background:radial-gradient(circle at 35% 30%, #fff1b8 0%, #e2b443 30%, #9b6f17 70%, #4d360a 100%);
  box-shadow:0 1px 2px rgba(0,0,0,.7), inset 0 0 0 1px rgba(77,54,10,.6);
  transform:translate(-50%,-50%);
}
.screw::after{content:""; position:absolute; left:20%; right:20%; top:46%; height:10%; background:rgba(60,40,6,.85); border-radius:2px; transform:rotate(var(--r,35deg))}
.screw.a{left:14.6%; top:14.6%; --r:30deg}
.screw.b{left:85.4%; top:14.6%; --r:-55deg}
.screw.c{left:85.4%; top:85.4%; --r:10deg}
.screw.d{left:14.6%; top:85.4%; --r:75deg}

.porthole figcaption{max-width:44ch; text-align:center; font-size:.95rem; line-height:1.5; color:var(--ink-muted); text-shadow:0 1px 12px rgba(8,20,25,.95)}
.porthole figcaption a{white-space:nowrap}
.porthole-toggle{
  font:600 .88rem/1 var(--sans); color:var(--ink); background:rgba(8,20,25,.55);
  border:1px solid var(--line); border-radius:999px; padding:.6rem 1rem; cursor:pointer;
  backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px);
}
.porthole-toggle:hover{border-color:var(--ink)}

/* chapters */
.artist-chapter{padding-block:clamp(5rem,10vw,9rem)}
.artist-chapter h2{text-shadow:0 2px 24px rgba(8,20,25,.85)}
.artist-chapter p{text-shadow:0 1px 14px rgba(8,20,25,.9)}
.reading{background:linear-gradient(180deg, rgba(8,20,25,.0), rgba(8,20,25,.55) 18%, rgba(8,20,25,.55) 82%, rgba(8,20,25,0))}

.bio-grid{display:grid; grid-template-columns:minmax(0,5fr) minmax(0,6fr); gap:clamp(2.5rem,6vw,6rem); align-items:center}
.portrait{margin:0; position:relative}
.portrait img{
  width:100%; border-radius:4px;
  border:1px solid rgba(201,208,209,.35);
  box-shadow:0 0 0 8px rgba(8,20,25,.65), 0 0 0 9px rgba(201,208,209,.18), 0 40px 90px rgba(0,0,0,.65);
}
.portrait figcaption{margin-top:1.4rem; font-family:var(--display); font-style:italic; font-size:1.15rem; color:var(--ink-muted)}
.bio h2{margin-bottom:1.6rem}
.bio p{max-width:58ch; font-size:1.12rem}

.manifesto{max-width:880px; margin-inline:auto}
.manifesto h2{max-width:18ch; margin-bottom:1.8rem}
.manifesto > p{max-width:62ch; font-size:1.14rem}
.pull{
  margin:clamp(3rem,6vw,4.5rem) 0; padding:0; border:0;
  font-family:var(--display); font-style:italic; font-weight:400;
  font-size:clamp(2rem,4.4vw,3.4rem); line-height:1.12; color:var(--lamp);
  max-width:24ch; text-shadow:0 2px 30px rgba(8,20,25,.9);
}
.pair{display:grid; grid-template-columns:1fr 1fr; gap:0; margin-top:clamp(3.5rem,7vw,5.5rem); border-top:1px solid var(--line)}
.pair > div{padding:2.2rem clamp(1.5rem,3.5vw,3rem) 0 0}
.pair > div + div{padding-left:clamp(1.5rem,3.5vw,3rem); padding-right:0; border-left:1px solid var(--line)}
.pair h3{margin-bottom:1rem}
.pair p{max-width:46ch; color:var(--ink)}

.closing{text-align:center; display:grid; justify-items:center}
.closing h2{max-width:22ch; margin-bottom:1.4rem}
.closing p{max-width:56ch; font-size:1.14rem; margin-bottom:2.2rem}
.closing .btn-row{justify-content:center}
.closing .btn-ghost{background:rgba(8,20,25,.5)}

/* ---------- responsive ---------- */
@media (max-width:900px){
  .artist-hero-grid,.bio-grid{grid-template-columns:1fr}
  .artist-hero{min-height:auto; padding-top:2.5rem}
  .artist-hero .lede{max-width:52ch}
  .porthole-bezel{width:min(100%,520px)}
  .portrait{max-width:480px}
  .pair{grid-template-columns:1fr}
  .pair > div,.pair > div + div{padding:2rem 0 0; border-left:0}
  .pair > div + div{margin-top:2rem; border-top:1px solid var(--line)}
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference){
  .porthole-bezel::before{animation:artist-breathe 7s ease-in-out infinite}
}
@keyframes artist-breathe{0%,100%{opacity:.75; transform:scale(.97)} 50%{opacity:1; transform:scale(1.03)}}
@media (prefers-reduced-motion: reduce){
  .artist-grain{animation:none}
  .veil{display:none}
}
