/* Sample-book flipbook (/samples): a row of sample covers, and one viewer that opens below it. The homepage shows the covers only, as links. */
.sfb{--sfb-line:rgba(200,169,110,0.4);--sfb-muted:#6F6053;--sfb-stage:#2B2623;max-width:1100px;margin:0 auto;}
.sfb-intro{max-width:56ch;margin:-24px 0 36px;color:var(--brown);font-weight:300;}
.sfb-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(12px,3vw,32px);}
.sfb-cards.four{grid-template-columns:repeat(4,minmax(0,1fr));}
.sfb-card{display:flex;flex-direction:column;align-items:center;gap:6px;padding:clamp(10px,2vw,22px);background:var(--warm-white);border:1px solid var(--sfb-line);cursor:pointer;text-align:center;font-family:'Jost',sans-serif;color:var(--charcoal);transition:border-color 0.2s,transform 0.2s;}
a.sfb-card{text-decoration:none;}
.sfb-card:hover{border-color:var(--gold);transform:translateY(-3px);}
.sfb-card.active{border-color:var(--charcoal);box-shadow:inset 0 0 0 1px var(--charcoal);}
.sfb-art{display:flex;align-items:center;width:100%;aspect-ratio:1/1;margin-bottom:10px;}
.sfb-art img{display:block;width:100%;height:auto;box-shadow:0 14px 22px -10px rgba(44,40,37,0.5);}
.sfb-name{font-family:'Cormorant Garamond',serif;font-size:clamp(1.3rem,2.6vw,1.9rem);line-height:1.1;}
.sfb-title{font-family:'Cormorant Garamond',serif;font-style:italic;color:var(--brown);font-size:clamp(0.95rem,1.8vw,1.15rem);}
.sfb-meta{font-size:0.8rem;letter-spacing:0.08em;color:var(--sfb-muted);}
.sfb-flip{margin-top:6px;font-size:0.75rem;letter-spacing:0.16em;text-transform:uppercase;color:var(--gold);font-weight:500;}
.sfb-fine{margin:24px 0 0;max-width:62ch;font-size:0.85rem;font-weight:300;color:var(--sfb-muted);}
.sfb-actions{margin-top:20px;}
.sfb button:focus-visible,.sfb a:focus-visible{outline:2px solid var(--charcoal);outline-offset:3px;}

.sfb-viewer{margin-top:32px;padding:22px 12px 16px;color:#F6EAD8;scroll-margin-top:90px;
  /* a wooden tabletop: window light from above, grain, plank seams, darker edges */
  background:
    radial-gradient(ellipse 70% 60% at 50% 28%,rgba(255,226,170,0.30),rgba(255,226,170,0) 70%),
    radial-gradient(ellipse 85% 85% at 50% 45%,rgba(0,0,0,0) 55%,rgba(0,0,0,0.5) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='700' height='500'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.004 0.2' numOctaves='3' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0.13 0 0 0 0 0.07 0 0 0 0 0.03 1.9 0 0 0 -0.6'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E"),
    repeating-linear-gradient(180deg,rgba(0,0,0,0.38) 0,rgba(0,0,0,0.38) 2px,rgba(255,255,255,0.05) 2px,rgba(255,255,255,0.05) 3px,transparent 3px,transparent 170px),
    #7c5738;}
/* light tables: the kids art book opens on a confetti play-mat, Kwento on dusty-blue linen, Alaala on a woven banig mat. Wood is the default. */
.sfb-viewer.playmat{background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'%3E%3Ccircle cx='30' cy='40' r='9' fill='%23F7B7A3'/%3E%3Ccircle cx='170' cy='24' r='6' fill='%23FFE08A'/%3E%3Ccircle cx='120' cy='130' r='10' fill='%23fff' opacity='.75'/%3E%3Ccircle cx='212' cy='150' r='8' fill='%23CDBFF2'/%3E%3Ccircle cx='64' cy='196' r='7' fill='%23fff' opacity='.75'/%3E%3Cpath d='M86 62l5-12 5 12 12 5-12 5-5 12-5-12-12-5z' fill='%23FFE08A'/%3E%3Cpath d='M150 206q8-16 16 0t16 0t16 0' fill='none' stroke='%23F7B7A3' stroke-width='5' stroke-linecap='round'/%3E%3Cpath d='M14 126q10-14 20 0t20 0' fill='none' stroke='%239FD3BF' stroke-width='5' stroke-linecap='round'/%3E%3Cpath d='M196 72l12 20h-24z' fill='%239FD3BF'/%3E%3C/svg%3E"),#BFE3EE;color:#3b2f2a;}
.sfb-viewer.linen{color:#3b2f2a;
  /* dusty-blue linen: window light, darker edges, soft folds, woven threads */
  background:
    radial-gradient(ellipse 70% 60% at 50% 26%,rgba(255,255,255,0.30),rgba(255,255,255,0) 70%),
    radial-gradient(ellipse 85% 85% at 50% 45%,rgba(0,0,0,0) 60%,rgba(25,45,65,0.26) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='700'%3E%3Cfilter id='f' x='0' y='0' width='100%25' height='100%25' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.004 0.010' numOctaves='3' seed='11' stitchTiles='stitch' result='n'/%3E%3CfeDiffuseLighting in='n' surfaceScale='9' diffuseConstant='1' lighting-color='%23fff'%3E%3CfeDistantLight azimuth='225' elevation='52'/%3E%3C/feDiffuseLighting%3E%3CfeColorMatrix values='1.3 0 0 0 -0.566  1.3 0 0 0 -0.566  1.3 0 0 0 -0.566  0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url%28%23f%29'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='w' x='0' y='0' width='100%25' height='100%25' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.03 0.9' numOctaves='2' seed='2' stitchTiles='stitch' result='h'/%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9 0.03' numOctaves='2' seed='9' stitchTiles='stitch' result='v'/%3E%3CfeComposite in='h' in2='v' operator='arithmetic' k1='0' k2='0.5' k3='0.5' k4='0'/%3E%3CfeColorMatrix values='1.1 0 0 0 -0.05  1.1 0 0 0 -0.05  1.1 0 0 0 -0.05  0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url%28%23w%29'/%3E%3C/svg%3E"),
    #8ea6b9;
  background-blend-mode:normal,normal,soft-light,soft-light,normal;}
.sfb-viewer.banig{color:#3b2f2a;
  /* natural woven banig mat: window light, darker edges, soft tone variation, diagonal weave */
  background:
    radial-gradient(ellipse 70% 60% at 50% 26%,rgba(255,244,214,0.28),rgba(255,244,214,0) 70%),
    radial-gradient(ellipse 85% 85% at 50% 45%,rgba(0,0,0,0) 60%,rgba(50,30,10,0.30) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='700' height='500'%3E%3Cfilter id='t' x='0' y='0' width='100%25' height='100%25' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012 0.012' numOctaves='3' seed='21' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0.5 0 0 0 0.25  0.5 0 0 0 0.25  0.5 0 0 0 0.25  0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url%28%23t%29'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Cdefs%3E%3ClinearGradient id='a' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='.1' stop-color='%23c3a56b'/%3E%3Cstop offset='.5' stop-color='%23d2b880'/%3E%3Cstop offset='.9' stop-color='%23c3a56b'/%3E%3C/linearGradient%3E%3ClinearGradient id='b' x1='1' y1='0' x2='0' y2='1'%3E%3Cstop offset='.1' stop-color='%23bf9f65'/%3E%3Cstop offset='.5' stop-color='%23cdb27a'/%3E%3Cstop offset='.9' stop-color='%23bf9f65'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='22' height='22' fill='%23b0925d'/%3E%3Cpolygon points='0,-11 11,0 0,11 -11,0' fill='url%28%23b%29'/%3E%3Cpolygon points='22,-11 33,0 22,11 11,0' fill='url%28%23b%29'/%3E%3Cpolygon points='0,11 11,22 0,33 -11,22' fill='url%28%23b%29'/%3E%3Cpolygon points='22,11 33,22 22,33 11,22' fill='url%28%23b%29'/%3E%3Cpolygon points='11,0 22,11 11,22 0,11' fill='url%28%23a%29'/%3E%3C/svg%3E"),
    #b8975a;
  background-blend-mode:normal,normal,soft-light,normal,normal;}
.sfb-viewer.playmat .sfb-head,.sfb-viewer.playmat .sfb-caption,.sfb-viewer.linen .sfb-head,.sfb-viewer.linen .sfb-caption,.sfb-viewer.banig .sfb-head,.sfb-viewer.banig .sfb-caption{color:#3b2f2a;text-shadow:none;}
.sfb-viewer.playmat .sfb-fit{filter:drop-shadow(0 10px 8px rgba(44,40,37,0.3));}
.sfb-viewer.linen .sfb-fit,.sfb-viewer.banig .sfb-fit{filter:drop-shadow(0 2px 2px rgba(20,35,50,0.3)) drop-shadow(0 14px 12px rgba(20,35,50,0.3));}
.sfb-viewer.playmat .sfb-bar button,.sfb-viewer.playmat .sfb-bar .sfb-counter,.sfb-viewer.linen .sfb-bar button,.sfb-viewer.linen .sfb-bar .sfb-counter,.sfb-viewer.banig .sfb-bar button,.sfb-viewer.banig .sfb-bar .sfb-counter{border-color:rgba(44,40,37,0.9);background:rgba(44,40,37,0.82);}
.sfb-viewer.playmat .sfb-bar button:hover,.sfb-viewer.linen .sfb-bar button:hover,.sfb-viewer.banig .sfb-bar button:hover{background:rgba(44,40,37,0.95);}
.sfb-viewer:fullscreen{display:flex;flex-direction:column;justify-content:center;}
.sfb-head{display:flex;flex-wrap:wrap;justify-content:space-between;gap:6px 16px;padding:0 8px 10px;font-size:0.74rem;letter-spacing:0.16em;text-transform:uppercase;color:var(--gold-light);text-shadow:0 1px 3px rgba(0,0,0,0.7);}
.sfb-stage{display:flex;justify-content:center;align-items:center;padding:6px 0;}
.sfb-fit{flex:none;position:relative;filter:drop-shadow(0 3px 3px rgba(0,0,0,0.45)) drop-shadow(0 22px 18px rgba(0,0,0,0.5));}
.sfb-leaf{background:#FBF5EF;overflow:hidden;}
.sfb-leaf img{display:block;width:100%;height:100%;user-select:none;-webkit-user-drag:none;}
.sfb-bar{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:8px;padding-top:12px;}
.sfb-bar button,.sfb-bar .sfb-counter{border:1px solid rgba(255,255,255,0.22);background:rgba(34,21,12,0.62);color:#F6EAD8;font-family:'Jost',sans-serif;font-size:0.9rem;font-weight:400;min-width:46px;height:44px;padding:0 14px;cursor:pointer;white-space:nowrap;}
.sfb-bar button:hover{background:rgba(34,21,12,0.85);}
.sfb-bar .sfb-counter{cursor:default;min-width:150px;text-align:center;line-height:42px;font-variant-numeric:tabular-nums;}
.sfb-caption{text-align:center;margin:12px auto 0;font-size:0.8rem;font-weight:300;color:rgba(246,234,216,0.88);text-shadow:0 1px 3px rgba(0,0,0,0.7);}

@media(max-width:768px){
  .sfb-cards.four{grid-template-columns:repeat(2,minmax(0,1fr));}
  .sfb-intro{margin-top:-12px;}
  .sfb-flip{display:none;}
  .sfb-viewer{margin-left:-12px;margin-right:-12px;padding:16px 4px 14px;}
  .sfb-head{padding:0 12px 10px;}
}
@media(prefers-reduced-motion:reduce){.sfb-card{transition:none;}}
