/* =====================================================================
   Rare Earth Projects · project-ill.css
   Shared by the project pages whose imagery is ILLUSTRATIVE (no layout
   drawings yet): Serenity, Tranquility, Arcadia.
   Load after site.css + project.css, before the page's own <slug>.css.
   Behaviour lives in assets/js/project-ill.js.

   Blocks
   - .ill-hero        hero: contour art panel underneath, illustrative
                      aerial render on top (shown only once it loads),
                      wordmark H1, "Illustrative 3D visualisation" note
   - .ill-fig         framed render with art fallback + caption
   - .ill-plan        illustrative layout (plan viewer + stamp) or a
                      placeholder sheet while the render is missing
   - .ill-viewing     viewing band on a solid dark ground
   - .ticks           checklist tiles (facts only)
   - .ill-path           numbered path (viewing → registration)
   - .trio            three-column copy band
   ===================================================================== */

/* ---------- hero ---------- */
.ill-hero{--wash:13,12,10}
.ill-hero .media{background:var(--base)}
.ill-hero .media>.art{position:absolute;inset:0;width:100%;height:100%}
.ill-hero .media>img.ill-r{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity 1.6s var(--ease)}
.ill-hero.has-render .media>img.ill-r{opacity:1}
.ill-hero .r-note{display:flex;align-items:center;gap:10px;opacity:0;transition:opacity .8s var(--ease) .4s}
.ill-hero .r-note::before{content:"";width:22px;height:1px;background:currentColor;opacity:.7}
.ill-hero.has-render .r-note{opacity:1}
/* light heroes: pale wash so dark ink reads over the render or the art */
.proj.lightc.ill-hero .media>img.ill-r{filter:saturate(.78) contrast(.96) brightness(1.06) sepia(.08)}
.proj.lightc.ill-hero .proj-cover::after{background:linear-gradient(180deg,rgba(var(--wash),.78) 0%,rgba(var(--wash),0) 24%,rgba(var(--wash),0) 42%,rgba(var(--wash),.88) 74%,rgb(var(--wash)) 100%)}
.proj.lightc.ill-hero.has-render .proj-cover::after{background:linear-gradient(90deg,rgba(var(--wash),.9) 0%,rgba(var(--wash),.66) 30%,rgba(var(--wash),.18) 52%,rgba(var(--wash),0) 66%),linear-gradient(180deg,rgba(var(--wash),.8) 0%,rgba(var(--wash),0) 24%,rgba(var(--wash),0) 46%,rgba(var(--wash),.9) 78%,rgb(var(--wash)) 100%)}
.proj.lightc.ill-hero .r-note{color:rgba(13,12,10,.62)}
.proj.lightc.ill-hero .tagline{color:#4f4a40}
.proj.lightc.ill-hero .facts b{color:var(--obsidian)}
.proj.lightc.ill-hero .hero-cta .link{color:var(--obsidian)}
.proj.dark.ill-hero .media>img.ill-r{filter:saturate(.8) contrast(1.04) brightness(.7) sepia(.12)}

/* ---------- framed render with art fallback ---------- */
.ill-fig{margin:0;position:relative}
.ill-frame{position:relative;overflow:hidden;background:var(--ash);aspect-ratio:4/5}
.ill-frame>.art{position:absolute;inset:0;width:100%;height:100%;z-index:0}
/* the art panel is its own stacking context, so its wordmark never shows through a render */
.ill-hero .media>.art,.ill-ph>.art{z-index:0}
.ill-frame>img.ill-r{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;transform:scale(1.04);transition:opacity 1.2s var(--ease),transform 1.8s var(--ease)}
.ill-fig.has-render .ill-frame>img.ill-r{opacity:1;transform:none}
.ill-fig figcaption{margin-top:16px;padding-top:14px;border-top:1px solid var(--line);font-size:.58rem;letter-spacing:.26em;text-transform:uppercase;color:var(--muted-2);display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}
.ill-fig figcaption i{font-style:normal;opacity:.85}
.ill-fig:not(.has-render) figcaption i{display:none}
.ill-fig.has-render[data-lightbox]{cursor:zoom-in}
.ill-fig[data-lightbox]:not(.has-render){pointer-events:none}

/* ---------- illustrative layout ---------- */
.ill-plan{min-height:240px}
.ill-plan .pv-sheet{position:relative}
.ill-stamp{position:absolute;left:clamp(16px,1.8vw,26px);top:clamp(16px,1.8vw,26px);z-index:5;display:inline-flex;align-items:center;gap:10px;padding:9px 14px;background:rgba(13,12,10,.86);color:var(--ivory);font-size:.56rem;letter-spacing:.26em;text-transform:uppercase;font-weight:500;pointer-events:none;max-width:calc(100% - 150px)}
.ill-stamp::before{content:"";flex:none;width:7px;height:7px;border:1px solid var(--gold);transform:rotate(45deg)}
.ill-note{font-size:.84rem;line-height:1.6;color:var(--muted);padding:14px 16px;border:1px dashed var(--line);margin-bottom:18px}
.ill-note b{font-weight:500;color:inherit}
.pv.is-full .ill-note{display:none}

/* placeholder sheet (plan render not delivered yet) */
.ill-ph{position:relative;min-height:clamp(340px,46vw,560px);overflow:hidden;border:1px solid var(--gold-lo);display:flex;align-items:center}
.ill-ph>.art{position:absolute;inset:0;width:100%;height:100%}
.ill-ph>.art img.wmi,.ill-ph>.art .wm{display:none}
.ill-ph-in{position:relative;z-index:2;max-width:560px;margin:clamp(24px,4vw,64px);padding:clamp(26px,3vw,44px);background:rgba(13,12,10,.82);color:var(--ivory);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.ill-ph-in .display{font-size:clamp(1.8rem,2.8vw,2.6rem);margin:16px 0 14px}
.ill-ph-in p{font-size:.95rem;color:var(--mute-d)}
.ill-ph-in .acts{margin-top:28px;gap:18px 26px}
.ill-ph-in .kicker{color:var(--gold)}
.ill-ph-in .display em{color:var(--gold-hi)}
.ill-ph-in .pill{border-color:var(--gold);color:var(--gold)}
.ill-ph-in .pill::before{background:var(--gold)}
.ill-ph-in .pill:hover{color:var(--obsidian)}

/* "plot sizes on request" row: no empty swatch column */
.ill-plan .pv-key li:only-child{grid-template-columns:1fr auto}
.ill-plan .pv-key li:only-child>span:empty{display:none}

/* ---------- viewing band on a dark ground (light pages too) ---------- */
.ill-viewing{position:relative;background:var(--obsidian);color:var(--ivory)}
.ill-viewing .bg img{opacity:0;transition:opacity 1.2s var(--ease)}
.ill-viewing .bg.has-render img{opacity:1}
.ill-viewing .bg .r-note{top:auto;bottom:clamp(16px,3vh,28px);right:var(--gut);color:rgba(244,239,230,.4);opacity:0;transition:opacity .8s var(--ease)}
.ill-viewing .bg.has-render .r-note{opacity:1}

/* ---------- facts list (label + figure rows) ---------- */
.ill-rows{list-style:none;border-top:1px solid var(--line)}
.ill-rows li{display:flex;justify-content:space-between;align-items:baseline;gap:20px;padding:18px 0;border-bottom:1px solid var(--line)}
.ill-rows span{font-size:.6rem;letter-spacing:.28em;text-transform:uppercase;color:var(--muted-2)}
.ill-rows b{font-family:var(--serif);font-weight:400;font-size:clamp(1.3rem,1.8vw,1.6rem);line-height:1.15;text-align:right}

/* ---------- quote line (owner's own Standard copy) ---------- */
.ill-quote{margin-top:clamp(56px,8vh,90px);padding-top:clamp(30px,4vh,44px);border-top:1px solid var(--line);display:grid;grid-template-columns:auto 1fr;gap:16px clamp(24px,4vw,60px);align-items:baseline}
.ill-quote .i{font-family:var(--serif);font-style:italic;font-size:1.1rem;color:var(--gold)}
.ill-quote p{font-family:var(--serif);font-weight:300;font-size:clamp(1.6rem,2.8vw,2.6rem);line-height:1.18;max-width:30ch}
.ill-quote small{display:block;margin-top:14px;font-family:var(--sans);font-size:.58rem;letter-spacing:.3em;text-transform:uppercase;color:var(--muted-2)}

/* ---------- checklist tiles ---------- */
.ticks{list-style:none;display:grid;grid-template-columns:repeat(3,1fr);border-top:1px solid var(--line);border-left:1px solid var(--line)}
.ticks li{position:relative;padding:clamp(26px,3vw,40px) clamp(20px,2.2vw,34px) clamp(24px,2.6vw,34px);border-right:1px solid var(--line);border-bottom:1px solid var(--line);min-height:190px;display:flex;flex-direction:column;justify-content:space-between;gap:26px}
.ticks svg{width:34px;height:34px;fill:none;stroke:var(--accent,var(--gold));stroke-width:1.1;stroke-linecap:round;stroke-linejoin:round}
.ticks b{display:block;font-family:var(--serif);font-weight:400;font-size:clamp(1.4rem,2vw,1.85rem);line-height:1.12}
.ticks small{display:block;margin-top:8px;font-size:.56rem;letter-spacing:.28em;text-transform:uppercase;color:var(--muted-2)}
.ticks li::after{content:"";position:absolute;right:clamp(18px,2vw,30px);top:clamp(26px,3vw,40px);width:9px;height:16px;border-right:1px solid var(--gold);border-bottom:1px solid var(--gold);transform:rotate(45deg) scale(.6);opacity:0;transition:opacity .6s var(--ease),transform .6s var(--ease)}
.ticks.in li::after,.rv.in .ticks li::after{opacity:1;transform:rotate(45deg) scale(1)}
.ticks li:nth-child(2)::after{transition-delay:.12s}.ticks li:nth-child(3)::after{transition-delay:.24s}
.ticks li:nth-child(4)::after{transition-delay:.36s}.ticks li:nth-child(5)::after{transition-delay:.48s}.ticks li:nth-child(6)::after{transition-delay:.6s}

/* ---------- numbered path ---------- */
.ill-path{list-style:none;display:grid;grid-template-columns:repeat(4,1fr);position:relative;counter-reset:st}
.ill-path::before{content:"";position:absolute;left:0;right:0;top:27px;height:1px;background:linear-gradient(90deg,var(--gold),rgba(202,167,115,.15));transform-origin:left;transition:transform 1.8s var(--ease)}
.rv:not(.in) .ill-path::before,.ill-path.rv:not(.in)::before{transform:scaleX(0)}
.ill-path li{counter-increment:st;position:relative;padding:0 clamp(14px,2vw,34px) 0 0}
.ill-path li::before{content:counter(st,decimal-leading-zero);position:relative;z-index:1;display:flex;align-items:center;justify-content:center;width:54px;height:54px;border-radius:50%;border:1px solid var(--gold);background:var(--base,var(--obsidian));color:var(--gold);font-size:.7rem;letter-spacing:.16em;font-weight:500}
.ill-path b{display:block;font-family:var(--serif);font-weight:400;font-size:clamp(1.45rem,2.1vw,1.9rem);line-height:1.1;margin:28px 0 12px}
.ill-path p{font-size:.92rem;color:var(--muted);max-width:30ch}
.ill-path-foot{display:flex;flex-wrap:wrap;align-items:center;gap:20px 34px;margin-top:clamp(44px,6vh,70px);padding-top:clamp(26px,4vh,40px);border-top:1px solid var(--line)}
.ill-path-foot p{font-size:.9rem;color:var(--muted);max-width:52ch}

/* ---------- three-column copy band ---------- */
.trio{list-style:none;display:grid;grid-template-columns:repeat(3,1fr);border-top:1px solid var(--line)}
.trio li{padding:32px clamp(12px,2vw,32px) 8px 0;border-right:1px solid var(--line)}
.trio li+li{padding-left:clamp(12px,2vw,32px)}
.trio li:last-child{border-right:0}
.trio .i{font-family:var(--serif);font-style:italic;font-size:1.1rem;color:var(--gold-hi)}
.trio b{display:block;font-family:var(--serif);font-weight:400;font-size:clamp(1.5rem,2.2vw,2rem);line-height:1.1;margin:14px 0 12px}
.trio p{font-size:.94rem;color:var(--muted)}
:is([data-mode="light"] .p-base,[data-paper="light"] .p-paper) .trio .i{color:var(--gold-lo)}

/* generic page-level bits */
.ill-sec{position:relative}
.ill-sec>.wrap{position:relative;z-index:1}
.ill-contours{position:absolute;left:0;top:0;width:100%;height:clamp(300px,38vw,500px);pointer-events:none;z-index:0;-webkit-mask-image:linear-gradient(180deg,#000 0%,rgba(0,0,0,.55) 45%,transparent 100%);mask-image:linear-gradient(180deg,#000 0%,rgba(0,0,0,.55) 45%,transparent 100%)}
.ill-contours path{fill:none;stroke:var(--accent,var(--gold));stroke-width:1;opacity:.28;vector-effect:non-scaling-stroke}
.ill-overview{padding-bottom:clamp(90px,12vh,150px)}
.ill-overview .proj-body{padding-bottom:0}

/* ---------- responsive ---------- */
@media (max-width:1024px){
  .ticks{grid-template-columns:repeat(2,1fr)}
  .ill-path{grid-template-columns:repeat(2,1fr);row-gap:44px}
  .ill-path::before{display:none}
}
@media (max-width:767px){
  .proj.lightc.ill-hero.has-render .proj-cover::after{background:linear-gradient(180deg,rgba(var(--wash),.86) 0%,rgba(var(--wash),.2) 17%,rgba(var(--wash),.5) 31%,rgba(var(--wash),.9) 43%,rgb(var(--wash)) 62%)}
  .proj.dark.ill-hero.has-render .proj-cover::after{background:linear-gradient(180deg,rgba(13,12,10,.72) 0%,rgba(13,12,10,.1) 24%,rgba(13,12,10,.45) 44%,rgba(13,12,10,.9) 64%,var(--base) 100%)}
  .ill-hero .r-note{top:auto;bottom:auto;right:auto;left:var(--gut);top:128px}
  .ill-stamp{max-width:calc(100% - 32px);font-size:.5rem;letter-spacing:.2em;padding:7px 10px;left:12px;top:12px}
  .ticks{grid-template-columns:1fr}
  .ticks li{min-height:0;flex-direction:row;align-items:center;justify-content:flex-start;gap:20px;padding:20px 44px 20px 18px}
  .ticks li::after{top:50%;margin-top:-10px}
  .ticks svg{flex:none;width:28px;height:28px}
  .ill-path{grid-template-columns:1fr;row-gap:0}
  .ill-path li{display:grid;grid-template-columns:54px 1fr;column-gap:20px;padding:0 0 30px}
  .ill-path li::before{grid-row:1/3}
  .ill-path li:not(:last-child)::after{content:"";position:absolute;left:27px;top:54px;bottom:0;width:1px;background:rgba(202,167,115,.35)}
  .ill-path b{margin:12px 0 8px}
  .trio{grid-template-columns:1fr}
  .trio li,.trio li+li{padding:24px 0 20px;border-right:0;border-bottom:1px solid var(--line)}
  .ill-ph{min-height:420px;align-items:flex-end}
  .ill-ph-in{margin:14px}
}
@media (prefers-reduced-motion:reduce){
  .ill-hero .media>img.ill-r,.ill-frame>img.ill-r{transition:none}
  .ticks li::after{opacity:1;transform:rotate(45deg) scale(1);transition:none}
  .ill-path::before{transform:none!important;transition:none}
}

/* overview: a framed render under the fact sheet */
.ov-fig{margin-top:clamp(34px,5vh,56px)}
.ov-fig .ill-frame{aspect-ratio:16/10}
.ov-fig .ill-frame>.art img.wmi{max-width:58%}
.ov-fig .ill-frame>.art .wm span{font-size:min(2rem,6cqw)}

/* gallery placeholder tiles (no renders yet): keep image wordmarks at
   wordmark size (.gal img would stretch them to cover the tile) */
.gal .ph-tile .art img.wmi{width:auto;height:auto;max-width:62%;object-fit:contain;transform:none;filter:none}
.gal .ph-tile:not(:first-child) .art img.wmi,.gal .ph-tile:not(:first-child) .art .wm{opacity:.55}
#gallery.is-ph .gal .ph-tile figcaption{display:none}

/* without JavaScript nothing adds .in: keep the wordmark H1s visible */
html.no-js .pj-wm small,html.no-js .pj-wm span{opacity:1;transform:none}
