/* AMSP 003 · Review 012 · H01.1 — Layout C "hybrid". PRIVATE EXPERIMENT.
   Loads after letter-cards.css (H01, unchanged). Every rule here is scoped to layout C:
   [data-layout="hybrid"] on the letter, or .h01-host--c on Section 01 (letter-cards-h011.js removes that class
   when ?letter=cards (A) or ?letter=stack (B) is requested, so A and B render exactly as in H01).
   Mechanics: A's native scroll-snap track. Materials: B's paper — edges, tucked next sheet, restrained shadows.
   Light comes from the photographic lemon (upper right), so paper shadows fall to the lower left. */

/* ---------- 1 · Heading: the italic "Letter" in the violet Review 010 intended (#653d77) ---------- */
.e003-review main>section.intro010.h01-host--c h2 i{color:#653d77}

/* ---------- 2 · Paper ---------- */
.h01-letter[data-layout="hybrid"],.h01-host--c .h01-letter{
  --c-paper:#fffaea;
  --c-paper-lit:linear-gradient(104deg,#fffdf3 0%,#fffaea 46%,#fdf3d6 100%);
  --c-edge:rgba(116,86,38,.17);
  --c-under-1:#f7eed3;--c-under-2:#efe3c1;
  --c-cast:-12px 20px 30px -18px rgba(74,50,18,.42),-2px 3px 7px rgba(74,50,18,.09);
  --c-contact:1px 0 1px rgba(74,50,18,.16),6px 0 12px -6px rgba(74,50,18,.30);  /* the sheet resting on the one beneath */
  --c-stack:-3px 4px 0 -1px var(--c-under-1),-3px 4px 0 0 var(--c-edge),-6px 8px 0 -2px var(--c-under-2),-6px 8px 0 -1px var(--c-edge);
  --c-grain:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .36 0 0 0 0 .27 0 0 0 0 .16 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}
.h01-letter.is-enhanced[data-layout="hybrid"] .h01-card,
.h01-host--c .h01-letter:not(.is-enhanced) .h01-letter__track,
.h01-host--c .h01-letter[data-layout="full"] .h01-letter__track{
  background:var(--c-paper-lit);border:1px solid var(--c-edge);border-radius:2px;
  box-shadow:inset -1px 1px 0 rgba(255,255,255,.75),var(--c-stack),var(--c-cast)}
.h01-host--c .h01-letter:not(.is-enhanced) .h01-letter__track,
.h01-host--c .h01-letter[data-layout="full"] .h01-letter__track{position:relative}
/* fine photographic paper grain replaces A's halftone dots */
.h01-letter.is-enhanced[data-layout="hybrid"] .h01-card::before,
.h01-host--c .h01-letter:not(.is-enhanced) .h01-letter__track::before,
.h01-host--c .h01-letter[data-layout="full"] .h01-letter__track::before{
  content:"";display:block;position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  background-image:var(--c-grain);background-size:180px 180px;opacity:.16;mix-blend-mode:multiply}

/* ---------- 3 · Track: next sheet tucked beneath the active sheet ---------- */
.h01-letter[data-layout="hybrid"]{--c-peek:62px;--c-tuck:22px}
.h01-letter.is-enhanced[data-layout="hybrid"] .h01-letter__track{flex-direction:row;align-items:stretch;gap:0;overflow-x:auto;overflow-y:hidden;
  scroll-snap-type:x mandatory;overscroll-behavior-x:contain;scrollbar-width:none;-webkit-overflow-scrolling:touch;
  padding:10px 2px 48px 14px;margin:-10px -2px -48px -14px;scroll-padding-inline:14px 2px;position:relative}
.h01-letter.is-enhanced[data-layout="hybrid"] .h01-letter__track::-webkit-scrollbar{display:none}
.h01-letter.is-enhanced[data-layout="hybrid"] .h01-card{flex:0 0 calc(100% - var(--c-peek));scroll-snap-align:start;scroll-snap-stop:always;position:relative}
.h01-letter.is-enhanced[data-layout="hybrid"] .h01-card+.h01-card{margin-left:calc(-1 * var(--c-tuck))}
/* trailing spacer so the last sheet rests where the others do */
.h01-letter.is-enhanced[data-layout="hybrid"] .h01-letter__track::after{content:"";flex:0 0 var(--c-peek)}
/* layering: active on top; the next sheet sits lower, slightly turned, and carries less shadow */
.h01-letter.is-enhanced[data-layout="hybrid"] .h01-card[data-h01-pos="active"]{z-index:3;
  box-shadow:inset -1px 1px 0 rgba(255,255,255,.75),var(--c-contact),var(--c-stack),var(--c-cast)}
.h01-letter.is-enhanced[data-layout="hybrid"] .h01-card[data-h01-pos="next"]{z-index:2;transform:translate(0,9px) rotate(.9deg);
  box-shadow:inset -1px 1px 0 rgba(255,255,255,.6),-8px 14px 22px -16px rgba(74,50,18,.32)}
.h01-letter.is-enhanced[data-layout="hybrid"] .h01-card[data-h01-pos="before"]{z-index:1;transform:translate(0,9px) rotate(-.9deg);box-shadow:none}
.h01-letter.is-enhanced[data-layout="hybrid"] .h01-card[data-h01-pos="after"]{z-index:0;transform:translate(0,14px) rotate(1.4deg);box-shadow:none}
.h01-letter.is-enhanced[data-layout="hybrid"] .h01-card:not([data-h01-pos="active"]){background:linear-gradient(104deg,#fbf4dc 0%,#f8efd2 100%)}
.h01-letter.is-enhanced[data-layout="hybrid"] .h01-card{--c-ink-rest:0}
.h01-letter.is-enhanced[data-layout="hybrid"] .h01-card[data-h01-pos="active"]{--c-ink-rest:1}
/* resting: only the active sheet carries ink; during a swipe the script sets --c-ink from the sheet's distance */
.h01-letter.is-enhanced[data-layout="hybrid"] .h01-card .h01-card__text{opacity:var(--c-ink,var(--c-ink-rest))}
/* the next sheet's running head shows at its edge — the only text on a waiting sheet */
.h01-letter.is-enhanced[data-layout="hybrid"] .h01-card__folio{display:flex;justify-content:space-between;gap:12px;margin:-6px 0 18px;position:relative;
  color:#6a5472;font:500 10.5px/1.3 "IBM Plex Mono",ui-monospace,monospace;letter-spacing:.16em;text-transform:uppercase}
.h01-letter.is-enhanced[data-layout="hybrid"] .h01-card__folio span:first-child{color:#50315d;font-weight:600}
.h01-letter.is-enhanced[data-layout="hybrid"] .h01-card[data-h01-pos="next"] .h01-card__folio{opacity:.62}
.h01-letter.is-enhanced[data-layout="hybrid"] .h01-card:not([data-h01-pos="active"]):not([data-h01-pos="next"]) .h01-card__folio{opacity:0}
@media(prefers-reduced-motion:no-preference){
  .h01-letter.is-enhanced[data-layout="hybrid"] .h01-card{transition:transform .6s cubic-bezier(.2,.7,.2,1),box-shadow .6s ease,background .6s ease}
  .h01-letter.is-enhanced[data-layout="hybrid"] .h01-card__text{transition:opacity .34s ease}
  .h01-letter.is-enhanced[data-layout="hybrid"] .h01-card__folio{transition:opacity .45s ease}
}
.h01-letter.is-following[data-layout="hybrid"] .h01-card__text{transition:none!important}
/* reduced motion: sheets keep their resting positions, nothing animates (no transitions declared above) */

/* ---------- 4 · Controls ---------- */
.h01-letter[data-layout="hybrid"] .h01-letter__controls{gap:8px;margin-top:20px}

/* ---------- 5 · Desktop ---------- */
@media(min-width:821px){
  .h01-letter[data-layout="hybrid"]{--c-peek:78px;--c-tuck:26px}
}

/* ---------- 6 · Tablet / phone: controls sit on the lemon's horizon ---------- */
@media(max-width:820px){
  /* The lemon rests on the foot of the section in every motion state (Review 010's desktop float kept its -50% lift on
     phones, leaving an empty band below). Same photograph, same 22 s drift, now anchored. */
  @media(prefers-reduced-motion:no-preference){
    .e003-review main>section.intro010.h01-host--c .intro010__sun{animation:h01c-sunrise 22s ease-in-out infinite}
  }
  .e003-review .h01-host--c .intro010__content{padding-bottom:calc(min(115vw,590px) * .8 - 30px)}
  .h01-host--c .h01-letter__controls{margin-top:22px}
}
@media(max-width:450px){
  .e003-review .h01-host--c .intro010__content{padding-bottom:calc(120vw * .8 - 22px)}
}
@keyframes h01c-sunrise{0%,100%{transform:translateY(0) rotate(-1deg)}50%{transform:translateY(-12px) rotate(1.3deg)}}
@media(max-width:560px){
  .h01-letter[data-layout="hybrid"]{--c-peek:24px;--c-tuck:12px}
  .h01-letter.is-enhanced[data-layout="hybrid"] .h01-letter__track{padding-left:10px;margin-left:-10px;scroll-padding-inline:10px 2px}
  .h01-letter.is-enhanced[data-layout="hybrid"] .h01-card__folio{margin:-4px 0 12px}
  /* one row: ← 01 / 03 → … READ AS ONE PAGE */
  .e003-review .h01-letter[data-layout="hybrid"] .h01-btn--mode{margin-left:auto;flex-basis:auto;padding:0 12px}
  .h01-letter[data-layout="hybrid"] .h01-letter__controls{gap:6px;flex-wrap:nowrap}
  .e003-review .h01-letter[data-layout="hybrid"] .h01-letter__count{margin:0 2px}
}
@media(max-width:359px){
  .h01-letter[data-layout="hybrid"] .h01-letter__controls{flex-wrap:wrap}
  .e003-review .h01-letter[data-layout="hybrid"] .h01-btn--mode{margin-left:0;flex-basis:100%}
}
@media(forced-colors:active){.h01-letter[data-layout="hybrid"] .h01-card{box-shadow:none;border:1px solid CanvasText}}
@media print{.h01-letter[data-layout="hybrid"] .h01-card{transform:none!important;box-shadow:none!important}}
