/* Rich motion foundation — design tokens + recipe CSS.
   Rich-rollout stage 0 (2026-11-11). Values are the adopted rich design's
   (lab test run #3), which the plan names canonical over the home-v2 set.
   Motion tokens follow the researched scale: durations 100/200/300/500/800ms
   (roughly geometric), four easings (standard / decelerate-in /
   accelerate-out / rich expressive), rise distances in three steps.
   Only transform and opacity are ever animated. Nothing is hidden by CSS:
   every recipe's initial state is set from rich.js, so with JS off, with a
   library failure, or under prefers-reduced-motion the page is complete. */
:root{
  --rich-paper:#faf7ef;
  --rich-paper-2:#f2ecdc;
  --rich-ink:#262d49;
  --rich-navy:#1e2742;
  --rich-navy-deep:#121830;
  --rich-gold:#b08d2a;
  --rich-gold-soft:rgba(176,141,42,.55);
  --rich-hair:rgba(30,39,66,.16);
  --rich-hair-paper:rgba(250,247,239,.22);
  --rich-mincho:"Hiragino Mincho ProN","Hiragino Mincho Pro","YuMincho","Yu Mincho","Noto Serif JP","Songti SC",serif;
  --duration-100:100ms;
  --duration-200:200ms;
  --duration-300:300ms;
  --duration-500:500ms;
  --duration-800:800ms;
  --ease-standard:cubic-bezier(.4,0,.2,1);
  --ease-decelerate:cubic-bezier(0,0,.2,1);
  --ease-accelerate:cubic-bezier(.4,0,1,1);
  --ease-rich:cubic-bezier(.22,.9,.26,1);
  --rise-sm:18px;
  --rise-md:30px;
  --rise-lg:56px;
}

/* Lenis recommended styles (the library toggles these classes itself). */
html.lenis,html.lenis body{height:auto}
.lenis.lenis-smooth{scroll-behavior:auto!important}
.lenis.lenis-stopped{overflow:hidden}

/* R6 — gold scroll progress line. Sits below the menu panel (z 110) and the
   open header chrome (z 120), so it never crosses the open menu (D4). */
.rich-progress{position:fixed;top:0;left:0;width:100%;height:2px;z-index:100;pointer-events:none;transition:opacity var(--duration-300) var(--ease-standard)}
.rich-progress span{display:block;height:100%;background:linear-gradient(90deg,var(--rich-gold),#d8b34a);transform:scaleX(0);transform-origin:0 50%}
body.menu-open .rich-progress{opacity:0}

/* R7 — hover inversion sweep for row links / banners. A navy field rises
   from the bottom edge and the label turns to paper. Apply via the utility
   class on new components; the JA-top closing banners opt in below. */
.rich-sweep{position:relative;isolation:isolate}
.rich-sweep::before{content:"";position:absolute;inset:0;z-index:-1;background:var(--rich-navy);transform:scaleY(0);transform-origin:50% 100%;transition:transform var(--duration-500) var(--ease-rich)}
.rich-sweep:hover::before{transform:scaleY(1)}
.rich-sweep:hover{color:var(--rich-paper)}

/* JA top application of R7 (stage 0 verification surface): the two closing
   banners keep their card frame; the navy sweep runs inside it. */
body.home2-page .declaration-banner{position:relative;isolation:isolate;overflow:hidden;transition:color .45s var(--ease-rich),border-color .45s var(--ease-rich),box-shadow .45s var(--ease-rich)}
body.home2-page .declaration-banner::before{content:"";position:absolute;inset:0;z-index:-1;background:var(--rich-navy);transform:scaleY(0);transform-origin:50% 100%;transition:transform var(--duration-500) var(--ease-rich)}
body.home2-page .declaration-banner:hover{color:var(--rich-paper)}
body.home2-page .declaration-banner:hover::before{transform:scaleY(1)}

@media (prefers-reduced-motion: reduce){
  .rich-sweep::before,body.home2-page .declaration-banner::before{transition:none}
  body.home2-page .declaration-banner{transition:none}
  .rich-progress{transition:none}
}
