/* ColorLull home page (redesign 2026-11-13, mockup 4 « Sélection » approved by the user).
   Loaded by home.html only, after site.css. Every class starts with hm- so nothing leaks to
   the other pages. Motion runs only with JavaScript (static/home.js adds .hm-js on <html>)
   and never under prefers-reduced-motion. No inline style anywhere (strict CSP). */

.hm { --accent: var(--brand); --accent-soft: color-mix(in srgb, var(--brand) 11%, var(--paper));
  --hm-ease: cubic-bezier(.16, 1, .3, 1); --hm-ease-io: cubic-bezier(.65, 0, .35, 1);
  --hm-lift: 0 2px 4px rgba(30, 28, 25, .08), 0 30px 60px -26px rgba(30, 28, 25, .5); }
.hm .kicker { color: var(--brand); }
.hm-section { padding-block: clamp(2.5rem, 1.75rem + 2.5vw, 4rem); }
.hm-head { display: flex; align-items: end; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-6); }
.hm-head .h2 { margin: 0; }
.hm-head__side { display: flex; align-items: center; gap: var(--s-4); }
.hm .more { color: var(--brand); text-decoration: none; display: inline-flex; gap: .4rem; align-items: center; }
.hm .more::after { content: "→"; transition: transform .25s var(--hm-ease); }
.hm .more:hover { color: var(--ink); }
.hm .more:hover::after { transform: translateX(4px); }
.hm-note { color: var(--ink-2); font-size: var(--text-sm); margin: var(--s-4) 0 0; }

/* ------------------------------------------------------------------ hero */
.hm-hero { position: relative; isolation: isolate; overflow: clip; padding-block: clamp(2rem, 1rem + 4vw, 5rem) clamp(3rem, 2rem + 3vw, 5rem); }
.hm-hero__grid { display: grid; gap: var(--s-7); align-items: center; }
@media (min-width: 56rem) { .hm-hero__grid { grid-template-columns: 1.05fr .95fr; gap: 4rem; } }
.hm-washes { position: absolute; inset: -10% -10% auto; height: 120%; z-index: -1; pointer-events: none; filter: blur(60px) saturate(1.2); opacity: .6; }
.hm-washes span { position: absolute; border-radius: 50%; mix-blend-mode: multiply; transition: background 2s; }
.hm-washes span:nth-child(1) { width: 38vw; height: 38vw; left: 52%; top: 4%; background: var(--hm-w1, #f6c27a); }
.hm-washes span:nth-child(2) { width: 30vw; height: 30vw; left: 70%; top: 34%; background: var(--hm-w2, #f2a07a); }
.hm-washes span:nth-child(3) { width: 26vw; height: 26vw; left: 46%; top: 46%; background: var(--hm-w3, #a8d8a0); opacity: .7; }
.hm-washes span:nth-child(4) { width: 22vw; height: 22vw; left: -6%; top: 60%; background: #8fb3c4; opacity: .5; }
.hm-hero h1 { margin-bottom: var(--s-5); }
.hm-hero h1 .hero__kicker { color: var(--brand); }
.hm-lull { position: relative; display: inline-block; font-style: italic; color: var(--brand); }
.hm-lull svg { position: absolute; left: -4%; bottom: -.18em; width: 108%; height: .4em; overflow: visible; }
.hm-lull path { fill: none; stroke: currentColor; stroke-width: 6; stroke-linecap: round; opacity: .55; }
.hm-hero .lede { margin-bottom: var(--s-5); }
.hm-proof { display: flex; gap: var(--s-6); flex-wrap: wrap; margin: var(--s-6) 0 0; color: var(--ink-2); font-size: var(--text-sm); }
.hm-proof dt, .hm-proof dd { margin: 0; }
.hm-proof b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; color: var(--ink); line-height: 1.1; }

.hm-stage { position: relative; width: min(100%, 27rem); justify-self: center; aspect-ratio: 5 / 7; margin: 0; }
.hm-stage__back { position: absolute; inset: 0; background: var(--sheet); border-radius: 4px; box-shadow: var(--shadow-sheet); }
.hm-stage__back:nth-child(1) { transform: rotate(5deg) translate(5%, 2%); }
.hm-stage__back:nth-child(2) { transform: rotate(-3.5deg) translate(-3%, 1%); }
.hm-stage__top { position: absolute; inset: 0; display: block; background: var(--sheet); border-radius: 4px; box-shadow: var(--hm-lift); padding: 6%;
  transition: transform 1s var(--hm-ease-io), opacity 1s var(--hm-ease-io); }
.hm-stage__top svg { display: block; width: 100%; height: 100%; overflow: visible; }
.hm-stage__top.is-leaving { transform: translate(-18%, -4%) rotate(-10deg); opacity: 0; }
.hm-stage__top.is-entering { transform: translateY(3%) scale(.97); opacity: 0; transition: none; }
.hm-pencil { opacity: 0; transition: opacity .4s; }
.hm-pencil.is-on { opacity: 1; }
.hm-pencil__body, .hm-pencil__tip { fill: var(--hm-pencil, #e0962f); }
.hm-stage__cap { position: absolute; left: 0; right: 0; top: calc(100% + 1rem); text-align: center; font-size: var(--text-sm); color: var(--ink-2); margin: 0; }
.hm-stage__cap a { color: var(--ink); font-weight: 700; text-decoration: none; }
.hm-stage__cap a:hover { text-decoration: underline; }
.hm-dots { display: flex; gap: .4rem; justify-content: center; margin-top: .5rem; }
.hm-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--rule); transition: width .4s var(--hm-ease), background .4s; }
.hm-dots i.is-on { width: 22px; border-radius: 99px; background: var(--ink); }

/* ------------------------------------------------------------------ carousel of free pages */
.hm-carousel { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(13rem, 22vw, 17rem); gap: var(--s-5); overflow-x: auto;
  scroll-snap-type: x mandatory; padding: var(--s-4) var(--gutter) var(--s-6); margin: 0 calc(-1 * var(--gutter)); list-style: none; scrollbar-width: none; }
.hm-carousel::-webkit-scrollbar { display: none; }
.hm-carousel > li { scroll-snap-align: start; }
.hm-ctl { display: none; gap: var(--s-2); }
.hm-js .hm-ctl { display: flex; }
.hm-round { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); font-size: 1.1rem; cursor: pointer;
  transition: background .2s, color .2s; }
.hm-round:hover { background: var(--ink); color: var(--paper); }
.hm-progress { height: 2px; background: var(--rule); border-radius: 2px; overflow: hidden; }
.hm-progress i { display: block; height: 100%; width: 30%; background: var(--ink); }

.hm-page { position: relative; }
.hm-page__art { position: relative; aspect-ratio: 5 / 7; background: var(--sheet); border-radius: 4px; box-shadow: var(--shadow-sheet); overflow: hidden;
  transition: transform .5s var(--hm-ease), box-shadow .5s; }
.hm-page__art img { position: absolute; inset: 6%; width: 88%; height: 88%; object-fit: contain; transition: opacity .6s; }
.hm-page__art .hm-colored { opacity: 0; }
.hm-page:hover .hm-page__art, .hm-page:focus-within .hm-page__art { transform: translateY(-6px) rotate(-.6deg); box-shadow: var(--hm-lift); }
.hm-page:hover .hm-colored, .hm-page:focus-within .hm-colored { opacity: 1; }
.hm-page .tile__title { font-size: 1.15rem; margin: var(--s-4) 0 .2rem; }
.hm-page .tile__title a { color: var(--ink); text-decoration: none; }
.hm-page .tile__title a::after { content: ""; position: absolute; inset: 0; }   /* whole card clickable */
.hm-page .tile__meta { color: var(--ink-2); font-size: var(--text-sm); margin: 0; }

/* ------------------------------------------------------------------ before / after */
.hm-feature { display: grid; gap: var(--s-7); align-items: center; }
@media (min-width: 56rem) { .hm-feature { grid-template-columns: .9fr 1.1fr; gap: 5rem; } }
.hm-compare { --pos: 55%; position: relative; aspect-ratio: 5 / 7; max-width: 30rem; width: 100%; justify-self: center; margin: 0;
  background: var(--sheet); border-radius: 4px; box-shadow: var(--hm-lift); overflow: hidden; touch-action: pan-y; }
.hm-compare img { position: absolute; inset: 5%; width: 90%; height: 90%; object-fit: contain; }
.hm-compare .hm-colored { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.hm-compare__bar { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; background: var(--ink); transform: translateX(-1px); pointer-events: none; }
.hm-compare__bar::after { content: "⇆"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 46px; height: 46px; border-radius: 50%;
  background: var(--ink); color: var(--paper); display: grid; place-items: center; font-size: 1.2rem; box-shadow: var(--hm-lift); }
.hm-compare input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.hm-compare__lbl { position: absolute; top: 1rem; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  background: rgba(255, 255, 255, .92); padding: .3rem .6rem; border-radius: 99px; pointer-events: none; }
.hm-compare__lbl--l { left: 1rem; }
.hm-compare__lbl--r { right: 1rem; }
.hm-checks { list-style: none; padding: 0; margin: var(--s-5) 0 var(--s-6); display: grid; gap: .8rem; }
.hm-checks li { display: flex; gap: .8rem; align-items: start; }
.hm-checks li::before { content: ""; flex: none; width: 22px; height: 22px; margin-top: .15rem; border-radius: 50%; background-color: var(--brand);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: center; background-size: 70%; background-repeat: no-repeat; }

/* ------------------------------------------------------------------ quote */
.hm-quote { text-align: center; max-width: 46rem; margin: 0 auto; }
.hm-quote blockquote { font-family: var(--font-display); font-size: clamp(1.6rem, 1.1rem + 2vw, 2.6rem); line-height: 1.25; margin: 0 0 var(--s-4); }
.hm-quote .hm-hl { background-image: linear-gradient(transparent 62%, color-mix(in srgb, var(--brand) 22%, transparent) 62%);
  background-size: 100% 100%; background-repeat: no-repeat; }
.hm-quote figcaption { color: var(--ink-2); font-size: var(--text-sm); }

/* ------------------------------------------------------------------ library */
.hm-library { position: relative; overflow: clip; isolation: isolate;
  background: radial-gradient(ellipse 60% 70% at 50% 35%, rgba(255, 248, 232, .9), transparent 70%), linear-gradient(#efe7d8, #e6dcc9); }
.hm-library::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .35;
  background: repeating-linear-gradient(90deg, transparent 0 46px, rgba(160, 140, 110, .12) 46px 48px); }
.hm-library::after { content: ""; position: absolute; left: 50%; top: 0; width: 70%; height: 70%; transform: translateX(-50%); pointer-events: none; z-index: -1;
  background: radial-gradient(ellipse 50% 60% at 50% 0%, rgba(255, 226, 170, .55), transparent 70%); }
.hm-library .hm-head { flex-direction: column; align-items: center; text-align: center; }
.hm-library .lede { margin: 0 auto; text-align: center; }
.hm-bay { position: relative; max-width: 62rem; margin: var(--s-7) auto 0; }
.hm-row { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: clamp(.6rem, 2vw, 1.75rem); flex-wrap: wrap;
  min-height: clamp(15rem, 30vw, 22rem); padding: 0 clamp(.5rem, 3vw, 2.5rem); perspective: 1600px; list-style: none; margin: 0; }
@media (min-width: 40rem) { .hm-row { flex-wrap: nowrap; } }
.hm-plank { position: relative; height: 22px; border-radius: 3px 3px 6px 6px;
  background: repeating-linear-gradient(92deg, transparent 0 18px, rgba(90, 60, 30, .08) 18px 19px, rgba(255, 255, 255, .05) 19px 40px),
    linear-gradient(#b98a5a, #9a6c40 55%, #7d5530);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 24px 30px -18px rgba(40, 25, 10, .55); }
.hm-plank::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 40px; background: linear-gradient(rgba(40, 25, 10, .18), transparent); filter: blur(4px); }

.hm-book { --w: clamp(8.5rem, 17vw, 12.5rem); --h: calc(var(--w) * 1.294); --d: calc(var(--w) * .14);
  position: relative; display: block; width: var(--w); height: var(--h); transform-style: preserve-3d; color: inherit;
  transform: rotateY(var(--ry, 26deg)); transition: transform .9s var(--hm-ease); }
.hm-book:focus-visible { outline-offset: 10px; }
.hm-book__face { position: absolute; display: block; backface-visibility: hidden; }
.hm-book__front { inset: 0; transform: translateZ(calc(var(--d) / 2)); border-radius: 2px 5px 5px 2px; overflow: hidden;
  box-shadow: inset 4px 0 6px -2px rgba(0, 0, 0, .35); background: var(--paper-2); }
.hm-book__front img { width: 100%; height: 100%; object-fit: cover; }
.hm-book__front::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .35) 48%, transparent 60%);
  transform: translateX(-120%); transition: transform 1.1s var(--hm-ease); }
.hm-book:hover .hm-book__front::after, .hm-book:focus-visible .hm-book__front::after { transform: translateX(120%); }
.hm-book__spine { top: 0; left: calc(-1 * var(--d)); width: var(--d); height: 100%; transform-origin: right center;
  transform: translateZ(calc(var(--d) / 2)) rotateY(-90deg); background: var(--accent); color: var(--on-accent);
  display: flex; align-items: center; justify-content: center; border-radius: 2px 0 0 2px;
  box-shadow: inset -6px 0 8px -4px rgba(0, 0, 0, .35), inset 4px 0 6px -4px rgba(255, 255, 255, .3); }
.hm-book__spine span { writing-mode: vertical-rl; transform: rotate(180deg); font: 400 calc(var(--d) * .42) / 1 var(--font-display); white-space: nowrap;
  overflow: hidden; max-height: 90%; text-overflow: ellipsis; }
.hm-book__pages { top: 2px; right: calc(-1 * var(--d)); width: var(--d); height: calc(100% - 4px); transform-origin: left center;
  transform: translateZ(calc(var(--d) / 2)) rotateY(90deg); background: repeating-linear-gradient(90deg, #fbf8f1 0 2px, #e9e2d3 2px 3px); }
.hm-book__top { top: 0; left: 0; width: 100%; height: var(--d); transform-origin: top center; transform: translateZ(calc(var(--d) / 2)) rotateX(-90deg);
  background: repeating-linear-gradient(0deg, #fbf8f1 0 2px, #e9e2d3 2px 3px); }
.hm-book::after { content: ""; position: absolute; left: 4%; right: -8%; bottom: -6px; height: 14px; border-radius: 50%; background: rgba(40, 25, 10, .4);
  filter: blur(6px); transform: translateZ(-20px); }
.hm-book:hover, .hm-book:focus-visible { transform: rotateY(4deg) translate3d(0, -16px, 70px); }
.hm-book__new { position: absolute; top: -10px; right: -12px; transform: translateZ(calc(var(--d) / 2 + 2px)) rotate(8deg); background: var(--brand); color: #fff;
  font: 700 .7rem / 1 var(--font-text); letter-spacing: .08em; text-transform: uppercase; padding: .4rem .55rem; border-radius: 4px; }
.hm-prop { flex: none; align-self: flex-end; display: flex; align-items: flex-end; gap: 2px; }
.hm-sp { display: block; width: clamp(1.4rem, 2.6vw, 2rem); border-radius: 2px; position: relative;
  box-shadow: inset -4px 0 6px -3px rgba(0, 0, 0, .35), inset 3px 0 4px -3px rgba(255, 255, 255, .35); transition: transform .5s var(--hm-ease); }
.hm-sp::before, .hm-sp::after { content: ""; position: absolute; left: 15%; right: 15%; height: 2px; background: rgba(255, 255, 255, .55); }
.hm-sp::before { top: 12%; }
.hm-sp::after { bottom: 12%; }
.hm-sp:nth-child(1) { background: #6b4a76; height: clamp(10rem, 19vw, 14rem); }
.hm-sp:nth-child(2) { background: #c9a46b; height: clamp(11rem, 21vw, 15.5rem); }
.hm-sp:nth-child(3) { background: #46663f; height: clamp(9.5rem, 18vw, 13rem); transform: rotate(-8deg); transform-origin: bottom right; }
.hm-prop--right { gap: .6rem; }
.hm-frame { width: clamp(5.5rem, 10vw, 8rem); aspect-ratio: 5 / 7; padding: 7px; background: #fff; border: 6px solid #3a2a1c;
  box-shadow: 6px 10px 18px -8px rgba(30, 20, 10, .6); transform: rotate(4deg); transform-origin: bottom left; }
.hm-frame img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 40rem) { .hm-prop { display: none; } }
.hm-lib-note { text-align: center; color: var(--ink-2); font-size: var(--text-sm); margin: var(--s-6) 0 0; }
.hm-lib-note a { color: var(--brand); }

/* book sheet (dialog, opened by home.js; without JS the book is a plain link) */
.hm-dialog { border: 0; padding: 0; border-radius: 22px; width: min(60rem, calc(100% - 2rem)); max-height: calc(100% - 2rem);
  background: var(--paper); color: var(--ink); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6); }
.hm-dialog::backdrop { background: rgba(30, 28, 25, .55); backdrop-filter: blur(4px); }
.hm-dialog[open] { animation: hm-pop .5s var(--hm-ease); }
@keyframes hm-pop { from { opacity: 0; transform: translateY(24px) scale(.97); } }
.hm-bk { display: grid; gap: var(--s-6); padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); }
@media (min-width: 48rem) { .hm-bk { grid-template-columns: 1fr 1.25fr; gap: var(--s-7); } }
.hm-bk__cover { border-radius: 3px 8px 8px 3px; overflow: hidden; box-shadow: var(--hm-lift); align-self: start; }
.hm-bk__cover img { width: 100%; height: auto; }
.hm-bk h2 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); margin-bottom: .4rem; }
.hm-bk__sub { color: var(--ink-2); margin-bottom: var(--s-5); }
.hm-facts { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 var(--s-5); padding: 0; list-style: none; }
.hm-facts li { font-size: .85rem; font-weight: 700; padding: .35rem .75rem; border-radius: 99px; background: var(--paper-2); }
.hm-bk__desc { color: var(--ink-2); }
.hm-peek { display: flex; gap: .75rem; margin: var(--s-5) 0; }
.hm-peek img { width: 30%; height: auto; aspect-ratio: 5 / 7; object-fit: contain; background: #fff; padding: 6px; border-radius: 3px; box-shadow: var(--shadow-sheet); }
.hm-peek img:nth-child(1) { transform: rotate(-3deg); }
.hm-peek img:nth-child(3) { transform: rotate(3deg); }
.hm-close { position: absolute; top: 1rem; right: 1rem; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--paper-2); font-size: 1.3rem; cursor: pointer; color: var(--ink); }

/* ------------------------------------------------------------------ guides, email strip */
.hm-posts { display: grid; gap: var(--s-6); grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); list-style: none; padding: 0; margin: 0; }
.hm-post { position: relative; }
.hm-post__img { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 10; background: var(--paper-2); }
.hm-post__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--hm-ease); }
.hm-post:hover .hm-post__img img { transform: scale(1.05); }
.hm-post h3 { font-size: 1.3rem; margin: var(--s-4) 0 .4rem; }
.hm-post h3 a { color: var(--ink); text-decoration: none; }
.hm-post h3 a::after { content: ""; position: absolute; inset: 0; }
.hm-post p { color: var(--ink-2); font-size: .95rem; margin: 0 0 .3rem; }
.hm-post .hm-meta { font-size: var(--text-xs); }
.hm-strip { display: grid; gap: var(--s-6); align-items: center; background: var(--sheet); border-radius: 24px;
  padding: clamp(2rem, 1rem + 4vw, 4rem); box-shadow: var(--shadow-sheet); }
@media (min-width: 56rem) { .hm-strip { grid-template-columns: 1.4fr 1fr; } .hm-strip .btn { justify-self: end; } }
.hm-strip h2 { margin-bottom: .5rem; }
.hm-strip p { color: var(--ink-2); margin: 0; }

/* ------------------------------------------------------------------ motion (JS only) */
.hm-js .hm-rv { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--hm-ease), transform .9s var(--hm-ease); }
.hm-js .hm-rv.is-in { opacity: 1; transform: none; }
.hm-js .hm-quote .hm-hl { background-size: 0% 100%; transition: background-size 1.4s .4s var(--hm-ease); }
.hm-js .hm-quote.is-in .hm-hl { background-size: 100% 100%; }
@media (prefers-reduced-motion: no-preference) {
  .hm-washes span { animation: hm-drift 22s var(--hm-ease-io) infinite alternate; }
  .hm-washes span:nth-child(2) { animation-delay: -6s; animation-duration: 26s; }
  .hm-washes span:nth-child(3) { animation-delay: -12s; }
  .hm-washes span:nth-child(4) { animation-delay: -3s; }
  .hm-lull path { stroke-dasharray: 400; stroke-dashoffset: 400; animation: hm-underline 1.4s .9s var(--hm-ease) forwards; }
  .hm-hero__copy > * { animation: hm-rise 1s var(--hm-ease) both; }
  .hm-hero__copy > :nth-child(2) { animation-delay: .12s; }
  .hm-hero__copy > :nth-child(3) { animation-delay: .24s; }
  .hm-hero__copy > :nth-child(4) { animation-delay: .36s; }
}
@keyframes hm-drift { to { transform: translate(-6vw, 4vw) scale(1.15); } }
@keyframes hm-underline { to { stroke-dashoffset: 0; } }
@keyframes hm-rise { from { opacity: 0; transform: translateY(24px); } }
@media (prefers-reduced-motion: reduce) {
  .hm-js .hm-rv { opacity: 1; transform: none; transition: none; }
  .hm-book, .hm-stage__top, .hm-page__art { transition: none; }
}
