/* Talefork shelf-pass tokens: Direction 1 'Plank'.
   Load AFTER tokens.css (tokens.css is unchanged).
   Light = honey oak on ivory paper. Dark = lamp-lit walnut on #17120E, with more lamp light on the top face and lip.
   Same names in both themes; resolved by [data-theme] like tokens.css.
   Cubby tokens are not shipped. */

:root {
  /* plank (shelf board), Direction 1 'Plank' */
  --tf-shelf-wood-top: #E2BC86;        /* top face, front edge (lit) */
  --tf-shelf-wood-top-back: #A97D4C;   /* top face, back edge against the wall */
  --tf-shelf-top-sheen: rgba(255, 240, 210, 0.35); /* light falling on the front of the top face */
  --tf-shelf-lip: #BC8850;             /* front edge (lip), top */
  --tf-shelf-lip-deep: #94622F;        /* lip, bottom */
  --tf-shelf-lip-highlight: rgba(255, 246, 228, 0.90); /* crisp 1px arris on the lip's top edge */
  --tf-shelf-lip-sheen: rgba(255, 235, 200, 0.18);
  --tf-shelf-grain: rgba(92, 52, 18, 0.10);
  --tf-shelf-grain-strong: rgba(92, 52, 18, 0.20);
  --tf-shelf-shadow: rgba(70, 45, 20, 0.28);      /* cast on the wall right under the lip */
  --tf-shelf-shadow-mid: rgba(70, 45, 20, 0.10);  /* ...fading over 22px */
  --tf-shelf-end: #9C6B38;             /* end grain at the plank ends */
  --tf-shelf-bracket: #8B5A14;         /* brass bracket (= --tf-brass light) */
  --tf-shelf-bracket-hi: #D4A24A;
  /* book */
  --tf-book-radius: 1px 3px 3px 1px;
  --tf-book-spine: linear-gradient(90deg, rgba(0,0,0,.42) 0, rgba(0,0,0,.16) 3px, rgba(255,255,255,.22) 5px, rgba(0,0,0,.28) 6.5px, rgba(0,0,0,0) 9px);
  --tf-book-gloss: linear-gradient(105deg, rgba(255,255,255,.10), rgba(255,255,255,0) 38%);
  --tf-book-pages: #F6EEDD;
  --tf-book-pages-line: rgba(120, 95, 60, 0.38);
  --tf-book-contact: rgba(55, 32, 10, 0.50);       /* soft contact shadow pool */
  --tf-book-contact-core: rgba(40, 22, 5, 0.80);   /* tight occlusion line at the base */
  --tf-book-cast: 3px 0 6px rgba(70, 40, 15, 0.22);
  --tf-book-lift: 0 14px 18px -6px rgba(60, 35, 10, 0.45);
  --tf-book-ribbon: #8B5A14;
  /* geometry */
  --tf-book-w: 84px;
  --tf-book-h: 112px;
  --tf-book-gap: 16px;
  --tf-plank-top: 14px;   /* visible top face (perspective strip) */
  --tf-plank-sink: 7px;   /* book base stands 7px into the top face: 7px of lit wood in front of each book */
  --tf-plank-lip: 12px;   /* front lip */
  --tf-plank-cast: 22px;  /* shadow on the wall under the lip */
  --tf-shelf-headroom: 22px; /* space above the books inside the scroller; pull-out needs >= 20px */
  /* motion */
  --tf-ease-settle: cubic-bezier(.2, .8, .3, 1);
  --tf-ease-lift: cubic-bezier(.2, .8, .2, 1);
  --tf-ease-pull: cubic-bezier(.3, .6, .2, 1);
  --tf-dur-settle: 320ms;
  --tf-stagger: 40ms;
  --tf-dur-lift: 140ms;
  --tf-dur-release: 200ms;
  --tf-dur-pull: 220ms;
}

[data-theme="dark"] {
  --tf-shelf-wood-top: #B0845A;        /* lamp-lit front of the top face */
  --tf-shelf-wood-top-back: #4A3423;
  --tf-shelf-top-sheen: rgba(255, 205, 130, 0.30);
  --tf-shelf-lip: #7A5536;
  --tf-shelf-lip-deep: #3F2B1C;
  --tf-shelf-lip-highlight: rgba(255, 222, 165, 0.85);
  --tf-shelf-lip-sheen: rgba(255, 200, 120, 0.16);
  --tf-shelf-grain: rgba(0, 0, 0, 0.16);
  --tf-shelf-grain-strong: rgba(0, 0, 0, 0.28);
  --tf-shelf-shadow: rgba(0, 0, 0, 0.62);
  --tf-shelf-shadow-mid: rgba(0, 0, 0, 0.25);
  --tf-shelf-end: #4A3322;
  --tf-shelf-bracket: #B8862E;
  --tf-shelf-bracket-hi: #FFD877;
  --tf-book-spine: linear-gradient(90deg, rgba(0,0,0,.55) 0, rgba(0,0,0,.2) 3px, rgba(255,220,170,.16) 5px, rgba(0,0,0,.35) 6.5px, rgba(0,0,0,0) 9px);
  --tf-book-gloss: linear-gradient(105deg, rgba(255,214,150,.09), rgba(255,214,150,0) 38%);
  --tf-book-pages: #D8C8AC;
  --tf-book-pages-line: rgba(70, 50, 30, 0.45);
  --tf-book-contact: rgba(0, 0, 0, 0.70);
  --tf-book-contact-core: rgba(0, 0, 0, 0.92);
  --tf-book-cast: 3px 0 7px rgba(0, 0, 0, 0.45);
  --tf-book-lift: 0 16px 20px -6px rgba(0, 0, 0, 0.70);
  --tf-book-ribbon: #FFCF5C;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --tf-shelf-wood-top: #B0845A;
    --tf-shelf-wood-top-back: #4A3423;
    --tf-shelf-top-sheen: rgba(255, 205, 130, 0.30);
    --tf-shelf-lip: #7A5536;
    --tf-shelf-lip-deep: #3F2B1C;
    --tf-shelf-lip-highlight: rgba(255, 222, 165, 0.85);
    --tf-shelf-lip-sheen: rgba(255, 200, 120, 0.16);
    --tf-shelf-grain: rgba(0, 0, 0, 0.16);
    --tf-shelf-grain-strong: rgba(0, 0, 0, 0.28);
    --tf-shelf-shadow: rgba(0, 0, 0, 0.62);
    --tf-shelf-shadow-mid: rgba(0, 0, 0, 0.25);
    --tf-shelf-end: #4A3322;
    --tf-shelf-bracket: #B8862E;
    --tf-shelf-bracket-hi: #FFD877;
    --tf-book-spine: linear-gradient(90deg, rgba(0,0,0,.55) 0, rgba(0,0,0,.2) 3px, rgba(255,220,170,.16) 5px, rgba(0,0,0,.35) 6.5px, rgba(0,0,0,0) 9px);
    --tf-book-gloss: linear-gradient(105deg, rgba(255,214,150,.09), rgba(255,214,150,0) 38%);
    --tf-book-pages: #D8C8AC;
    --tf-book-pages-line: rgba(70, 50, 30, 0.45);
    --tf-book-contact: rgba(0, 0, 0, 0.70);
    --tf-book-contact-core: rgba(0, 0, 0, 0.92);
    --tf-book-cast: 3px 0 7px rgba(0, 0, 0, 0.45);
    --tf-book-lift: 0 16px 20px -6px rgba(0, 0, 0, 0.70);
    --tf-book-ribbon: #FFCF5C;
  }
}
