/* ══════════════════════════════════════════════════════════════
   HLI — Engagement layer (Nov 2026)
   Self-check · ripple explorer · weekly question · floating CTA ·
   cookie notice · hero motion. Uses the royal register tokens.
   ══════════════════════════════════════════════════════════════ */

/* ── Weekly family question ──────────────────────────────── */
.eg-week{
    position:relative; max-width:860px; margin:0 auto 2.4rem;
    padding:1.9rem 2.2rem 1.6rem 2.6rem; border-radius:8px;
    background:#fff; border:1px solid var(--r-rule);
    box-shadow:var(--r-shadow-md); overflow:hidden;
}
.eg-week::before{
    content:''; position:absolute; left:0; top:0; bottom:0; width:6px;
    background:var(--dom,var(--r-navy));
}
.eg-week::after{
    content:'\201C'; position:absolute; right:1.2rem; top:-1.6rem;
    font-family:var(--r-serif); font-size:9rem; line-height:1;
    color:var(--r-gold-lt); opacity:.45; pointer-events:none;
}
.eg-week__tag{ display:flex; flex-wrap:wrap; gap:.4rem 1rem; align-items:baseline; }
.eg-week__k{
    font-size:.7rem; font-weight:700; letter-spacing:.18em; text-transform:uppercase;
    color:var(--r-gold-text);
}
.eg-week__d{ font-size:.78rem; color:var(--dom,var(--r-navy)); font-weight:600; }
.eg-week__q{
    position:relative; z-index:1;
    font-family:var(--r-serif); font-size:clamp(1.45rem,2.6vw,1.95rem); font-weight:600;
    line-height:1.3; color:var(--r-ink); margin:.8rem 0 .7rem; max-width:32ch;
}
.eg-week__n{ font-size:.84rem; color:var(--r-muted); margin:0; }
.eg-week__n a{ color:var(--r-navy); font-weight:600; }
.eg-week-band{ padding:clamp(2.5rem,5vw,4rem) 0; background:var(--r-parchment); border-top:1px solid var(--r-rule); }
.eg-week-band .eg-week{ margin-bottom:0; }

/* ── Whole-Child Check ───────────────────────────────────── */
.eg-check{
    padding:clamp(4rem,8vw,6.5rem) 0; border-top:1px solid var(--r-rule);
    background:
        radial-gradient(ellipse 50% 60% at 88% 12%, rgba(196,162,74,.16) 0%, transparent 60%),
        linear-gradient(170deg, var(--r-ivory) 0%, var(--r-parchment) 100%);
}
.eg-check__grid{
    display:grid; grid-template-columns:.85fr 1.15fr; gap:clamp(2rem,5vw,4rem);
    align-items:center; max-width:1120px; margin:0 auto;
}
.eg-check__h2{
    font-family:var(--r-serif); font-size:clamp(2rem,4vw,3rem); font-weight:600;
    line-height:1.12; color:var(--r-ink); margin:.7rem 0 1rem;
}
.eg-check__h2 em{ font-style:italic; color:var(--r-gold); }
.eg-check__p{ font-size:1.02rem; line-height:1.72; color:var(--r-body); margin:0 0 1.2rem; max-width:44ch; }
.eg-check__meta{ display:flex; flex-wrap:wrap; gap:.5rem; }
.eg-check__meta span{
    font-size:.72rem; font-weight:600; letter-spacing:.06em; color:var(--r-navy);
    padding:.4rem .8rem; border:1px solid var(--r-gold-lt); border-radius:999px; background:rgba(255,255,255,.7);
}

.eg-card{
    position:relative; background:#fff; border:1px solid var(--r-rule); border-radius:10px;
    box-shadow:var(--r-shadow-lg); padding:2rem 2.1rem 1.8rem; min-height:25rem;
    display:flex; flex-direction:column;
}
.eg-card::before{
    content:''; position:absolute; inset:7px; border:1px solid var(--r-gold-lt);
    border-radius:6px; pointer-events:none; opacity:.7;
}
.eg-card > *{ position:relative; }
.eg-prog{ display:flex; gap:.4rem; margin-bottom:1.5rem; }
.eg-prog i{ flex:1; height:4px; border-radius:2px; background:var(--r-rule-cool); transition:background .4s ease; }
.eg-prog i.is-done{ background:var(--r-gold); }
.eg-prog i.is-now{ background:var(--r-navy); }

.eg-q{ display:none; flex:1; flex-direction:column; }
.eg-q.is-on{ display:flex; animation:eg-in .5s cubic-bezier(.16,1,.3,1) both; }
.eg-q__k{
    font-size:.68rem; font-weight:700; letter-spacing:.18em; text-transform:uppercase;
    color:var(--dom,var(--r-navy));
}
.eg-q__t{
    font-family:var(--r-serif); font-size:clamp(1.4rem,2.4vw,1.75rem); font-weight:600;
    line-height:1.28; color:var(--r-ink); margin:.7rem 0 1.6rem;
}
.eg-opts{ display:grid; gap:.6rem; margin-top:auto; }
.eg-opt{
    display:flex; align-items:center; gap:.9rem; width:100%; text-align:left; cursor:pointer;
    padding:.95rem 1.1rem; border:1px solid var(--r-rule); border-radius:6px; background:var(--r-ivory);
    font-family:var(--r-sans); font-size:.95rem; font-weight:500; color:var(--r-body);
    transition:border-color .25s ease, background .25s ease, transform .25s cubic-bezier(.16,1,.3,1), box-shadow .25s ease;
}
.eg-opt::before{
    content:''; width:14px; height:14px; flex-shrink:0; border-radius:50%;
    border:2px solid var(--r-gold); background:#fff; transition:background .2s ease;
}
.eg-opt:hover, .eg-opt:focus-visible{
    border-color:var(--r-gold); background:#fff; transform:translateX(4px); box-shadow:var(--r-shadow-sm);
}
.eg-opt:hover::before, .eg-opt:focus-visible::before{ background:var(--r-gold); }
.eg-opt:focus-visible{ outline:2px solid var(--r-navy); outline-offset:2px; }

.eg-res{ display:none; }
.eg-res.is-on{ display:grid; grid-template-columns:auto 1fr; gap:1.6rem; align-items:center; animation:eg-in .6s cubic-bezier(.16,1,.3,1) both; }
.eg-radar{ width:210px; height:210px; }
.eg-radar__web{ fill:none; stroke:var(--r-rule); stroke-width:1; }
.eg-radar__axis{ stroke:var(--r-rule); stroke-width:1; }
.eg-radar__shape{
    fill:rgba(156,122,46,.22); stroke:var(--r-gold); stroke-width:2; stroke-linejoin:round;
    transform-origin:105px 105px; animation:eg-grow .9s cubic-bezier(.16,1,.3,1) both;
}
.eg-radar__lbl{ font-family:var(--r-sans); font-size:8.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; fill:var(--r-navy); }
.eg-radar__dot{ fill:var(--r-navy); }
.eg-res__k{ font-size:.68rem; font-weight:700; letter-spacing:.18em; text-transform:uppercase; color:var(--r-gold-text); }
.eg-res__h{ font-family:var(--r-serif); font-size:1.7rem; font-weight:600; line-height:1.18; color:var(--r-ink); margin:.4rem 0 .6rem; }
.eg-res__p{ font-size:.93rem; line-height:1.62; color:var(--r-body); margin:0 0 .6rem; }
.eg-res__pair{ font-size:.84rem; color:var(--r-muted); margin:0 0 1rem; }
.eg-res__pair b{ color:var(--r-navy); }
.eg-res__act{ display:flex; flex-wrap:wrap; gap:.6rem; align-items:center; }
.eg-btn{
    display:inline-flex; align-items:center; justify-content:center; cursor:pointer;
    padding:.8rem 1.3rem; border-radius:4px; font-family:var(--r-sans); font-size:.85rem; font-weight:600;
    letter-spacing:.03em; text-decoration:none; border:1px solid var(--r-navy);
    background:var(--r-navy); color:#fff; transition:transform .3s cubic-bezier(.16,1,.3,1), background .3s ease;
}
.eg-btn:hover{ transform:translateY(-2px); background:var(--r-navy-deep); color:#fff; }
.eg-btn--ghost{ background:transparent; color:var(--r-navy); border-color:var(--r-gold); }
.eg-btn--ghost:hover{ background:var(--r-gold-wash); color:var(--r-navy); }
.eg-card__foot{ margin:1.3rem 0 0; font-size:.76rem; line-height:1.5; color:var(--r-muted); }

/* ── Ripple explorer ─────────────────────────────────────── */
.eg-ripple{
    padding:clamp(3.5rem,7vw,5.5rem) 0; background:var(--r-white);
    border-top:1px solid var(--r-rule); border-bottom:1px solid var(--r-rule); overflow:hidden;
}
.eg-ripple__hd{ text-align:center; max-width:60ch; margin:0 auto 2.4rem; }
.eg-ripple__h2{ font-family:var(--r-serif); font-size:clamp(1.9rem,3.8vw,2.8rem); font-weight:600; line-height:1.15; color:var(--r-ink); margin:.6rem 0 .8rem; }
.eg-ripple__h2 em{ font-style:italic; color:var(--r-gold); }
.eg-ripple__sub{ font-size:1rem; line-height:1.7; color:var(--r-body); margin:0; }
.eg-ripple__grid{
    display:grid; grid-template-columns:minmax(280px,440px) 1fr; gap:clamp(2rem,5vw,4.5rem);
    align-items:center; max-width:1060px; margin:0 auto;
}
.eg-ripple__svg{ width:100%; height:auto; display:block; filter:drop-shadow(0 18px 40px rgba(11,31,58,.14)); }
.eg-ring{ cursor:pointer; transition:opacity .45s ease, filter .45s ease; opacity:.42; }
.eg-ring.is-on{ opacity:1; }
.eg-ring:hover{ opacity:.85; }
.eg-ring.is-on:hover{ opacity:1; }
.eg-ring__lbl{
    font-family:var(--r-sans); font-size:10px; font-weight:700; letter-spacing:.16em;
    text-transform:uppercase; fill:#fff; pointer-events:none; opacity:.9;
}
.eg-ring__me{ font-family:var(--r-serif); font-size:22px; font-weight:600; fill:#fff; pointer-events:none; }
.eg-pulse{ fill:none; stroke:var(--r-gold-mid); stroke-width:2; opacity:0; pointer-events:none; transform-origin:220px 220px; }
.eg-pulse.is-go{ animation:eg-pulse 1.1s ease-out; }

.eg-tabs{ display:flex; flex-wrap:wrap; gap:.4rem; margin-bottom:1.5rem; }
.eg-tab{
    cursor:pointer; padding:.5rem .85rem; border-radius:999px; border:1px solid var(--r-rule);
    background:var(--r-ivory); font-family:var(--r-sans); font-size:.74rem; font-weight:600;
    color:var(--r-body); transition:all .3s ease;
}
.eg-tab:hover{ border-color:var(--r-gold); }
.eg-tab[aria-selected="true"]{ background:var(--dom,var(--r-navy)); border-color:var(--dom,var(--r-navy)); color:#fff; }
.eg-tab:focus-visible{ outline:2px solid var(--r-gold); outline-offset:2px; }
.eg-pane{ display:none; }
.eg-pane.is-on{ display:block; animation:eg-in .5s cubic-bezier(.16,1,.3,1) both; }
.eg-pane__k{ font-size:.7rem; font-weight:700; letter-spacing:.2em; text-transform:uppercase; color:var(--dom,var(--r-navy)); }
.eg-pane__h{ font-family:var(--r-serif); font-size:clamp(1.8rem,3.2vw,2.5rem); font-weight:600; line-height:1.12; color:var(--r-ink); margin:.5rem 0 .9rem; }
.eg-pane__p{ font-size:1.05rem; line-height:1.72; color:var(--r-body); margin:0 0 1.1rem; max-width:46ch; }
.eg-pane__kid{
    position:relative; margin:0 0 1.3rem; padding:.9rem 1.1rem .9rem 1.3rem; max-width:46ch;
    border-left:3px solid var(--dom,var(--r-navy)); background:var(--r-ivory); border-radius:0 6px 6px 0;
    font-family:var(--r-serif); font-size:1.15rem; font-style:italic; line-height:1.4; color:var(--r-ink);
}
.eg-pane__kid small{ display:block; font-family:var(--r-sans); font-style:normal; font-size:.66rem; font-weight:700; letter-spacing:.14em; text-transform:uppercase; color:var(--r-muted); margin-bottom:.3rem; }
.eg-pane__go{ font-size:.86rem; font-weight:700; color:var(--r-navy); text-decoration:none; border-bottom:1px solid var(--r-gold); padding-bottom:2px; }
.eg-pane__go:hover{ color:var(--r-gold); }

/* ── Floating call to action ─────────────────────────────── */
.eg-fab{
    position:fixed; right:1.4rem; bottom:1.4rem; z-index:900;
    display:inline-flex; align-items:center; gap:.65rem;
    padding:.85rem 1.3rem; border-radius:999px; text-decoration:none;
    background:var(--r-navy); color:#fff; border:1px solid var(--r-gold-mid);
    font-family:var(--r-sans); font-size:.84rem; font-weight:600; letter-spacing:.02em;
    box-shadow:0 10px 30px rgba(11,31,58,.32);
    transform:translateY(140%); opacity:0;
    transition:transform .55s cubic-bezier(.16,1,.3,1), opacity .4s ease, background .3s ease;
}
.eg-fab[hidden]{ display:none; }
.eg-fab.is-on{ transform:none; opacity:1; }
.eg-fab:hover{ background:var(--r-navy-deep); color:#fff; }
.eg-fab__dot{ width:9px; height:9px; border-radius:50%; background:var(--r-gold-mid); box-shadow:0 0 0 0 rgba(201,162,75,.7); animation:eg-beat 2.2s ease-out infinite; }
body.eg-has-cookie .eg-fab{ bottom:6.5rem; }

/* ── Cookie notice ───────────────────────────────────────── */
.eg-cookie{
    position:fixed; left:1rem; right:1rem; bottom:1rem; z-index:950; margin:0 auto; max-width:880px;
    display:flex; align-items:center; gap:1.2rem; padding:1rem 1.3rem;
    background:#fff; border:1px solid var(--r-gold-lt); border-radius:8px;
    box-shadow:0 14px 44px rgba(11,31,58,.22);
    animation:eg-in .5s cubic-bezier(.16,1,.3,1) both;
}
.eg-cookie[hidden]{ display:none; }
.eg-cookie__txt{ flex:1; margin:0; font-family:var(--r-sans); font-size:.86rem; line-height:1.55; color:var(--r-body); }
.eg-cookie__txt a{ color:var(--r-navy); font-weight:600; white-space:nowrap; }
.eg-cookie__act{ display:flex; gap:.5rem; flex-shrink:0; }
/* Accept and Decline carry equal weight on purpose. */
.eg-cookie__btn{
    cursor:pointer; padding:.65rem 1.2rem; border-radius:4px; min-width:6.2rem;
    font-family:var(--r-sans); font-size:.84rem; font-weight:600;
    background:var(--r-navy); color:#fff; border:1px solid var(--r-navy);
    transition:background .25s ease;
}
.eg-cookie__btn:hover{ background:var(--r-navy-deep); }
.eg-cookie__btn:focus-visible{ outline:2px solid var(--r-gold); outline-offset:2px; }
.ft__legal--btn{ background:none; border:0; border-bottom:1px solid rgba(255,255,255,.25); padding:0; font:inherit; cursor:pointer; }

/* ── Hero motion (homepage) ──────────────────────────────── */
.hm-plate__seal img{ animation:eg-float 7s ease-in-out infinite; }
.hm-legend__row{ transition:transform .45s cubic-bezier(.16,1,.3,1), background .45s ease; border-radius:4px; padding:.15rem .4rem .15rem 0; }
.hm-legend__row.is-lit{ transform:translateX(8px); background:linear-gradient(90deg, var(--r-gold-wash) 0%, transparent 100%); }
.hm-legend__row.is-lit .hm-legend__bar{ box-shadow:0 0 0 3px rgba(201,162,75,.28); }
.hm-hero__copy > *{ animation:eg-in .8s cubic-bezier(.16,1,.3,1) both; }
.hm-hero__copy > *:nth-child(1){ animation-delay:.05s; }
.hm-hero__copy > *:nth-child(2){ animation-delay:.15s; }
.hm-hero__copy > *:nth-child(3){ animation-delay:.25s; }
.hm-hero__copy > *:nth-child(4){ animation-delay:.35s; }
.hm-hero__copy > *:nth-child(5){ animation-delay:.45s; }
.hm-hero__copy > *:nth-child(6){ animation-delay:.55s; }
.hm-hero__copy > *:nth-child(7){ animation-delay:.65s; }
.hm-hero__copy > *:nth-child(8){ animation-delay:.75s; }
.hm-h1 em{
    background:linear-gradient(100deg, var(--r-gold) 0%, var(--r-gold-mid) 45%, var(--r-gold) 90%);
    background-size:220% 100%; -webkit-background-clip:text; background-clip:text;
    -webkit-text-fill-color:transparent; color:var(--r-gold);
    animation:eg-shine 6s ease-in-out infinite;
}
/* "What children will also need": each quality lights in turn */
.hm-qual li{ animation:eg-lit 9s ease-in-out infinite; }
.hm-qual li:nth-child(1){ animation-delay:0s; }
.hm-qual li:nth-child(2){ animation-delay:1.5s; }
.hm-qual li:nth-child(3){ animation-delay:3s; }
.hm-qual li:nth-child(4){ animation-delay:4.5s; }
.hm-qual li:nth-child(5){ animation-delay:6s; }
.hm-qual li:nth-child(6){ animation-delay:7.5s; }
/* Primary buttons: a light sweep on hover */
.hm-btn--p, .eg-btn:not(.eg-btn--ghost), .mt-invite__btn--p{ position:relative; overflow:hidden; }
.hm-btn--p::after, .eg-btn:not(.eg-btn--ghost)::after, .mt-invite__btn--p::after{
    content:''; position:absolute; top:0; bottom:0; left:-60%; width:40%;
    background:linear-gradient(100deg, transparent, rgba(255,255,255,.28), transparent);
    transform:skewX(-20deg); transition:left .7s ease;
}
.hm-btn--p:hover::after, .eg-btn:not(.eg-btn--ghost):hover::after, .mt-invite__btn--p:hover::after{ left:120%; }

@keyframes eg-in{ from{ opacity:0; transform:translateY(16px); } to{ opacity:1; transform:none; } }
@keyframes eg-grow{ from{ transform:scale(.1); opacity:0; } to{ transform:scale(1); opacity:1; } }
@keyframes eg-pulse{ 0%{ opacity:.9; transform:scale(.2); } 100%{ opacity:0; transform:scale(1.06); } }
@keyframes eg-beat{ 0%{ box-shadow:0 0 0 0 rgba(201,162,75,.7); } 70%{ box-shadow:0 0 0 10px rgba(201,162,75,0); } 100%{ box-shadow:0 0 0 0 rgba(201,162,75,0); } }
@keyframes eg-float{ 0%,100%{ transform:translateY(0); } 50%{ transform:translateY(-9px); } }
@keyframes eg-shine{ 0%,100%{ background-position:0% 0; } 50%{ background-position:100% 0; } }
@keyframes eg-lit{
    0%,12%,100%{ border-color:var(--r-rule); box-shadow:none; transform:none; }
    4%,8%{ border-color:var(--r-gold); box-shadow:0 6px 18px rgba(156,122,46,.18); transform:translateY(-3px); }
}

@media(max-width:900px){
    .eg-check__grid, .eg-ripple__grid{ grid-template-columns:1fr; }
    .eg-ripple__svg{ max-width:360px; margin:0 auto; }
    .eg-pane, .eg-tabs{ text-align:left; }
}
@media(max-width:620px){
    .eg-card{ padding:1.6rem 1.3rem 1.4rem; min-height:0; }
    .eg-res.is-on{ grid-template-columns:1fr; justify-items:center; text-align:center; }
    .eg-res__act{ justify-content:center; }
    .eg-week{ padding:1.5rem 1.3rem 1.3rem 1.7rem; }
    .eg-cookie{ flex-direction:column; align-items:stretch; text-align:left; }
    .eg-cookie__act{ justify-content:stretch; }
    .eg-cookie__btn{ flex:1; }
    .eg-fab{ right:.8rem; bottom:.8rem; font-size:.78rem; padding:.75rem 1rem; }
    body.eg-has-cookie .eg-fab{ display:none; }
}
@media (prefers-reduced-motion: reduce){
    .hm-plate__seal img, .hm-h1 em, .hm-qual li, .eg-fab__dot, .hm-hero__copy > *,
    .eg-q.is-on, .eg-res.is-on, .eg-pane.is-on, .eg-radar__shape, .eg-cookie{ animation:none !important; }
    .eg-fab, .eg-opt, .hm-legend__row{ transition:none; }
}

/* The site justifies long prose (section 14 of hli-royal.css). These short
   blocks read better ragged, so they opt out at matching specificity. */
html body main :is(.eg-week, .eg-check, .eg-card, .eg-pane, .mt-invite, .fm-act, .mt-step__card) :is(p, li){
    text-align:left; hyphens:manual; -webkit-hyphens:manual;
}
html body main :is(.eg-ripple__sub, .hm-become__note, .fm-note){ text-align:center; hyphens:manual; -webkit-hyphens:manual; }
@media(max-width:620px){ html body main .eg-res.is-on p{ text-align:center; } }
