/* Mend home hero. Brand tokens only. */
/* Nunito Italic (SIL Open Font License): the rounded face that matches the logo's "m". */
@font-face{font-family:"Mend Logo Nunito";src:url("/assets/fonts/Nunito-Italic-500.woff2") format("woff2");font-style:italic;font-weight:500;font-display:swap}
body.mend-home{margin:0;background:#FFFFFF;color:#172026}
/* Holds the space of the script-mounted header so the page does not jump when it appears. */
[data-mend-header]:empty{min-height:85px}
@media(max-width:640px){[data-mend-header]:empty{min-height:123px}}
/* One screen: the full-colour swirl fills everything under the header, with the heading and the whole ball on it. */
body.mend-home{--head:85px;--home-h:max(calc(100vh - var(--head)),600px);--copy:clamp(165px,22vh,200px)}
@supports(height:100svh){body.mend-home{--home-h:max(calc(100svh - var(--head)),600px)}}
@media(max-width:640px){body.mend-home{--head:123px}}
.home-hero{position:relative;height:var(--home-h);background:#E59E4C}
.home-stage{position:absolute;inset:0;overflow:hidden;background:#E59E4C;cursor:grab;touch-action:pan-y;user-select:none;-webkit-user-select:none}
.home-stage.is-pressed{cursor:grabbing}
/* A live gradient in the swirl's colours holds the white heading until the first video frame arrives. No still image. */
.home-stage::before{content:"";position:absolute;inset:-25%;background:radial-gradient(circle at 42% 38%,#E59E4C 0%,rgba(229,158,76,0) 52%),radial-gradient(circle at 34% 20%,#E19D61 0%,rgba(225,157,97,0) 44%),#B3C6D1;animation:home-swirl-wait 9s ease-in-out infinite alternate}
.home-stage.has-swirl::before{display:none;animation:none}
@keyframes home-swirl-wait{from{transform:translate3d(-4%,-3%,0) rotate(-6deg)}to{transform:translate3d(5%,4%,0) rotate(8deg)}}
@media(prefers-reduced-motion:reduce){.home-stage::before{animation:none}}
.home-canvas{position:absolute;inset:0;width:100%;height:100%;display:block}
/* Plain looping swirl: the fallback when WebGL is unavailable, and the frame source when it is. */
.home-swirl{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.home-stage.has-gl .home-swirl{opacity:0;pointer-events:none}
.home-copy{position:absolute;left:0;right:0;top:0;display:flex;flex-direction:column;align-items:center;gap:clamp(6px,1.2vh,12px);padding:clamp(28px,7vh,72px) 24px 0;text-align:center;pointer-events:none}
html body.mend-home .home-copy h1.home-title{margin:0;color:#FFFFFF;font-family:"Mend Logo Nunito",sans-serif!important;font-style:italic!important;font-weight:500!important;font-size:clamp(34px,4.6vw,68px);line-height:1.08;text-wrap:balance}
.home-copy p{margin:0;color:#FFFFFF;font-size:clamp(18px,1.9vw,28px);font-weight:600;line-height:1.25}

/* The ball stays still at the centre. Thick squircles orbit close around it in 3D; the chosen one rests in front of it, at the centre. */
.home-orbit{--ball:min(72vw,54vh,580px,calc((var(--home-h) - var(--copy))*.86));--disc:min(34vw,24vh,226px);position:relative;z-index:1;height:calc(var(--home-h) - var(--copy));margin-top:calc(var(--copy) - var(--home-h));overflow:hidden;overflow:clip;cursor:grab;touch-action:pan-y;user-select:none;-webkit-user-select:none}
.home-orbit.is-dragging{cursor:grabbing}
.orbit-ball{position:absolute;left:50%;top:50%;z-index:50;width:var(--ball);height:var(--ball);margin:calc(var(--ball)/-2) 0 0 calc(var(--ball)/-2);overflow:hidden;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fff5e8 0%,#f8ddba 34%,#e6b57c 64%,#b77a44 100%);box-shadow:0 0 72px 26px rgba(232,176,108,.24);pointer-events:none}
/* Frutiger Aero gloss on the ball: a window-like highlight on top, reflected light underneath. */
.orbit-ball::before{content:"";position:absolute;z-index:2;left:13%;right:13%;top:3.5%;height:42%;border-radius:50%;background:linear-gradient(180deg,rgba(255,255,255,.88) 0%,rgba(255,255,255,.2) 72%,rgba(255,255,255,0) 100%)}
.orbit-ball::after{content:"";position:absolute;z-index:2;inset:0;border-radius:50%;box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.55),inset 0 -36px 60px rgba(255,245,232,.62),inset 0 -6px 14px rgba(255,255,255,.7)}
.orbit-sheen{position:absolute;inset:0;border-radius:50%;background:radial-gradient(circle at 72% 50%,rgba(255,255,255,.22) 0%,rgba(255,255,255,0) 30%)}
.orbit-list{position:absolute;left:50%;top:50%;width:0;height:0;margin:0;padding:0;list-style:none}
.orbit-item{position:absolute;left:0;top:0;width:0;height:0}
.orbit-disc{--c:#B3C6D1;position:absolute;display:block;width:var(--disc);height:var(--disc);margin:calc(var(--disc)/-2) 0 0 calc(var(--disc)/-2);color:#172026;text-align:center;text-decoration:none;transform-style:preserve-3d;cursor:inherit;-webkit-user-drag:none}
.orbit-disc.is-front{cursor:pointer}
.orbit-disc:focus-visible{outline:3px solid #172026;outline-offset:6px;border-radius:30%}
.orbit-resource{--c:#B3C6D1}
.orbit-feature{--c:#F7F2EA}
.orbit-offer{--c:#E59E4C}
.orbit-layer,.orbit-disc-inner{position:absolute;inset:0;box-sizing:border-box;border-radius:30%}
@supports (corner-shape:squircle){.orbit-layer,.orbit-disc-inner,.orbit-disc:focus-visible{border-radius:50%;corner-shape:squircle}}
/* The side wall is a stack of slightly darker slices behind the face. */
.orbit-layer{background:color-mix(in srgb,var(--c) 84%,#172026);pointer-events:none}
.orbit-layer.is-last{box-shadow:0 22px 44px color-mix(in srgb,#172026 22%,transparent)}
.orbit-disc-inner{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:12%;overflow:hidden;isolation:isolate;background:linear-gradient(180deg,color-mix(in srgb,var(--c) 62%,#FFFFFF) 0%,color-mix(in srgb,var(--c) 88%,#FFFFFF) 47%,color-mix(in srgb,var(--c) 90%,#172026) 53%,var(--c) 76%,color-mix(in srgb,var(--c) 58%,#FFFFFF) 100%);box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.8),inset 0 2px 6px rgba(255,255,255,.95),inset 0 -14px 26px rgba(255,255,255,.5),inset 0 0 18px color-mix(in srgb,var(--c) 70%,#172026);pointer-events:none}
/* Frutiger Aero gloss: a curved highlight across the top half of the glass. */
.orbit-disc-inner::before{content:"";position:absolute;z-index:-1;left:5%;right:5%;top:2.5%;height:47%;border-radius:46% 46% 50% 50%/34% 34% 66% 66%;background:linear-gradient(180deg,rgba(255,255,255,.9) 0%,rgba(255,255,255,.34) 62%,rgba(255,255,255,.1) 100%)}
.orbit-disc strong{font-size:clamp(15px,calc(var(--disc)*.092),24px);font-weight:700;line-height:1.14}
.orbit-line{font-size:clamp(10.5px,calc(var(--disc)*.058),14px);font-weight:600;line-height:1.3}
/* Same YouTube and Reddit marks as the site footer, enlarged. */
.orbit-yt{position:relative;display:block;width:calc(var(--disc)*.3);height:calc(var(--disc)*.21);border-radius:calc(var(--disc)*.058);background:#ff3b30}
.orbit-yt::after{content:"";position:absolute;left:50%;top:50%;margin:calc(var(--disc)*-.044) 0 0 calc(var(--disc)*-.03);border-left:calc(var(--disc)*.076) solid #fff;border-block:calc(var(--disc)*.044) solid transparent}
.orbit-reddit{display:block;width:calc(var(--disc)*.26);height:calc(var(--disc)*.26);background:url("/assets/home/reddit.svg") center/contain no-repeat}
.orbit-icon{display:block;width:calc(var(--disc)*.25);height:calc(var(--disc)*.25);background:center/contain no-repeat}
/* The Mend logo file, unchanged, with the same corners as the site header. */
.orbit-icon-practice{background-image:url("/assets/mend-logo.jpg");background-size:cover;border-radius:19%}
.orbit-icon-resources{background-image:url("/assets/home/icon-resources.svg")}
.orbit-icon-worksheets{background-image:url("/assets/home/icon-worksheets.svg")}
/* Page not found. */
body:has(.home-404){margin:0}
.home-404{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;min-height:56vh;padding:48px 24px;text-align:center;color:#172026}
.home-404 h1{margin:0;font-size:clamp(26px,4vw,40px)}
.home-404 a{color:inherit;font-weight:600;text-decoration:underline;text-underline-offset:4px}
/* Shown only when scripts do not run. */
.home-noscript{position:relative;z-index:2;max-width:640px;margin:0 auto;padding:32px 24px;color:#172026}
.home-noscript a{color:inherit}
